go program name code example
Example: go program name
pr, _ := os.Executable()
fmt.Printf(" %s\n", pr)
// alternative
fmt.Printf(" %s\n", os.Args[0])
pr, _ := os.Executable()
fmt.Printf(" %s\n", pr)
// alternative
fmt.Printf(" %s\n", os.Args[0])