Loading…

How will you access command line arguments in a GO program?

The command line argument can be accessed using the os.Args variables.

For instance:
Package main
import (
  “fmt”
   “OS”
)
func main () {
   fmt.Println(len(os.Args), os.Args)
}

Suggest An Answer

No suggestions avaliable!

Latest post from Go programming interview questions

Ask Question