summaryrefslogtreecommitdiff
path: root/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/string_array_flag.go
diff options
context:
space:
mode:
authorLibravatar Terin Stock <terinjokes@gmail.com>2025-03-09 17:47:56 +0100
committerLibravatar Terin Stock <terinjokes@gmail.com>2025-03-10 01:59:49 +0100
commit3ac1ee16f377d31a0fb80c8dae28b6239ac4229e (patch)
treef61faa581feaaeaba2542b9f2b8234a590684413 /vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/string_array_flag.go
parent[chore] update URLs to forked source (diff)
downloadgotosocial-3ac1ee16f377d31a0fb80c8dae28b6239ac4229e.tar.xz
[chore] remove vendor
Diffstat (limited to 'vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/string_array_flag.go')
-rw-r--r--vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/string_array_flag.go33
1 files changed, 0 insertions, 33 deletions
diff --git a/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/string_array_flag.go b/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/string_array_flag.go
deleted file mode 100644
index 66aa5f2dc..000000000
--- a/vendor/github.com/grpc-ecosystem/grpc-gateway/v2/utilities/string_array_flag.go
+++ /dev/null
@@ -1,33 +0,0 @@
-package utilities
-
-import (
- "flag"
- "strings"
-)
-
-// flagInterface is a cut down interface to `flag`
-type flagInterface interface {
- Var(value flag.Value, name string, usage string)
-}
-
-// StringArrayFlag defines a flag with the specified name and usage string.
-// The return value is the address of a `StringArrayFlags` variable that stores the repeated values of the flag.
-func StringArrayFlag(f flagInterface, name string, usage string) *StringArrayFlags {
- value := &StringArrayFlags{}
- f.Var(value, name, usage)
- return value
-}
-
-// StringArrayFlags is a wrapper of `[]string` to provider an interface for `flag.Var`
-type StringArrayFlags []string
-
-// String returns a string representation of `StringArrayFlags`
-func (i *StringArrayFlags) String() string {
- return strings.Join(*i, ",")
-}
-
-// Set appends a value to `StringArrayFlags`
-func (i *StringArrayFlags) Set(value string) error {
- *i = append(*i, value)
- return nil
-}