flags
This commit is contained in:
parent
75c81c6d95
commit
c1d067e350
13
xx-flags.go
Normal file
13
xx-flags.go
Normal file
@ -0,0 +1,13 @@
|
||||
package main
|
||||
|
||||
import ("fmt"; "flag")
|
||||
|
||||
func main() {
|
||||
maxp := flag.Int("repeat", 3, "number of times to repeat arguments")
|
||||
flag.Parse()
|
||||
for i := 0; i < *maxp; i++ {
|
||||
for _, arg := range flag.Args() {
|
||||
fmt.Println(arg)
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user