mirror of
https://github.com/hashicorp/vault.git
synced 2026-02-09 09:51:10 +01:00
* license: update headers to IBM Corp. * `make proto` * update offset because source file changed Signed-off-by: Ryan Cragun <me@ryan.ec> Co-authored-by: Ryan Cragun <me@ryan.ec>
20 lines
410 B
Go
20 lines
410 B
Go
// Copyright IBM Corp. 2016, 2025
|
|
// SPDX-License-Identifier: BUSL-1.1
|
|
|
|
package sliceflag
|
|
|
|
import "strings"
|
|
|
|
// StringFlag implements the flag.Value interface and allows multiple
|
|
// calls to the same variable to append a list.
|
|
type StringFlag []string
|
|
|
|
func (s *StringFlag) String() string {
|
|
return strings.Join(*s, ",")
|
|
}
|
|
|
|
func (s *StringFlag) Set(value string) error {
|
|
*s = append(*s, value)
|
|
return nil
|
|
}
|