ogier/pflag

how to support glob?

darren opened this issue · 0 comments

var files = flag.StringSlice("files", "", "")

for _, file := range *files {
     fmt.Println(file)
}
./p --files a b c -b xxx

which prints:
a
b
c
#now if I got three files
$ ls *.txt
a.txt b.txt c.txt

./p --files *.txt -b xxx
#shall print:
a.txt
b.txt
c.txt