How to find oneself

cat-town
Dan Buch 8 years ago
parent 670630bcdb
commit 120fbf58b6
No known key found for this signature in database
GPG Key ID: FAEF12936DD3E3EC

@ -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…
Cancel
Save