// Golang program to show how
// to use command-line arguments
package main
import (
"fmt"
"os"
)
func main() {
// The first argument
// is always program name
myProgramName := os.Args[0]
// it will display
// the program name
fmt.Println(myProgramName)
}
Output : Here, you can see it is showing the program name with full path. Basically you can call this as Os Filepath output. If you will run the program with some dummy arguments then that will also print as a program name.