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
5package 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.
10func List(name rune, helpvalue ...string) *[]string {
11	p := []string{}
12	CommandLine.Flag(&p, name, helpvalue...)
13	return &p
14}
15
16func (s *Set) List(name rune, helpvalue ...string) *[]string {
17	p := []string{}
18	s.Flag(&p, name, helpvalue...)
19	return &p
20}
21
22func ListLong(name string, short rune, helpvalue ...string) *[]string {
23	p := []string{}
24	CommandLine.FlagLong(&p, name, short, helpvalue...)
25	return &p
26}
27
28func (s *Set) ListLong(name string, short rune, helpvalue ...string) *[]string {
29	p := []string{}
30	s.FlagLong(&p, name, short, helpvalue...)
31	return &p
32}
33