1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
| package main
import (
"fmt"
"os"
)
func main() {
argsWithProg := os.Args
argsWithoutProg := os.Args[1:]
arg := os.Args[3]
fmt.Printf("%#v,%T\n", argsWithProg, argsWithProg)
fmt.Printf("%v,%T\n", argsWithoutProg, argsWithoutProg)
fmt.Printf("%v,%T\n", arg, arg)
}
|