How to find oneself
This commit is contained in:
parent
670630bcdb
commit
120fbf58b6
12
whothis/main.go
Normal file
12
whothis/main.go
Normal file
@ -0,0 +1,12 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
)
|
||||
|
||||
func main() {
|
||||
fmt.Printf("args: %#v\n", os.Args)
|
||||
fmt.Printf("prog: %s\n", filepath.Base(os.Args[0]))
|
||||
}
|
Loading…
Reference in New Issue
Block a user