How to find oneself

This commit is contained in:
Dan Buch
2016-07-10 21:29:23 -04:00
parent 670630bcdb
commit 120fbf58b6

12
whothis/main.go Normal file
View 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]))
}