1 // Copyright 2017 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
14 // A StringsFlag is a command-line flag that interprets its argument
15 // as a space-separated list of possibly-quoted strings.
16 type StringsFlag
[]string
18 func (v
*StringsFlag
) Set(s
string) error
{
20 *v
, err
= str
.SplitQuotedFields(s
)
27 func (v
*StringsFlag
) String() string {
28 return "<StringsFlag>"
31 // AddBuildFlagsNX adds the -n and -x build flags to the flag set.
32 func AddBuildFlagsNX(flags
*flag
.FlagSet
) {
33 flags
.BoolVar(&cfg
.BuildN
, "n", false, "")
34 flags
.BoolVar(&cfg
.BuildX
, "x", false, "")