Source File
string_array_flag.go
Belonging Package
github.com/grpc-ecosystem/grpc-gateway/v2/utilities
package utilitiesimport ()// 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 ( flagInterface, string, string) *StringArrayFlags {:= &StringArrayFlags{}.Var(, , )return}// StringArrayFlags is a wrapper of `[]string` to provider an interface for `flag.Var`type StringArrayFlags []string// String returns a string representation of `StringArrayFlags`func ( *StringArrayFlags) () string {return strings.Join(*, ",")}// Set appends a value to `StringArrayFlags`func ( *StringArrayFlags) ( string) error {* = append(*, )return nil}
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |