Question:

Explain how you to access command line arguments passed to a GO program?

Answer:

You can access the command line argument using the os.Args variables. For example,

Package main

import (
	“fmt”
	“OS”
	)

func main () {
	fmt.Println(len(os.Args), os.Args)
}

 


Keywords:

© 2017 QuizBucket.org