Skip to content

Instantly share code, notes, and snippets.

Last active September 17, 2016 00:34
What would you like to do?
Go - show program name and arguments
// go run argi.go
package main
import "os"
import "fmt"
func main() {
fmt.Println("prog:", os.Args[0])
if len(os.Args) > 1 {
fmt.Println("args:", os.Args[1:])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment