Implement CLI application by editing main.go.
You may add new files to keep your code clean, if it is allowed in your challenge.
You can get arguments as args in main.go file where the run method is defined.
func run(args []string) {
// code to run
}args is simply came from os.Args, passed by main function.
It passes command line arguments without its script name.
You can use fmt.Println methods to output your results.
fmt.Println(args)If you want to use external libraries, do the following:
- Add the following lines to codecheck.yml, before the
go buildline
(You can have multiple libraries by adding more lines)
build:
- go get namespace.of/some/library