Debian Codegraph @

v2/list.go

raw symbols SCIP
1 // Copyright 2017 Google Inc. 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.
4
5 package getopt
6
7 // List creates an option that returns a slice of strings. The parameters
8 // passed are converted from a comma separated value list into a slice.
9 // Subsequent occurrences append to the list.
10 func List(name rune, helpvalue ...string) *[]string {
11 p := []string{}
12 CommandLine.Flag(&p, name, helpvalue...)
13 return &p
14 }
15
16 func (s *Set) List(name rune, helpvalue ...string) *[]string {
17 p := []string{}
18 s.Flag(&p, name, helpvalue...)
19 return &p
20 }
21
22 func ListLong(name string, short rune, helpvalue ...string) *[]string {
23 p := []string{}
24 CommandLine.FlagLong(&p, name, short, helpvalue...)
25 return &p
26 }
27
28 func (s *Set) ListLong(name string, short rune, helpvalue ...string) *[]string {
29 p := []string{}
30 s.FlagLong(&p, name, short, helpvalue...)
31 return &p
32 }