Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Latest commit

 

History

History
34 lines (25 loc) · 900 Bytes

README.md

File metadata and controls

34 lines (25 loc) · 900 Bytes

Command line application template for Go

Implement CLI application by editing main.go.
You may add new files to keep your code clean, if it is allowed in your challenge.

How to get input parameters

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.

How to output result

You can use fmt.Println methods to output your results.

fmt.Println(args)

Install External Libraries

If you want to use external libraries, do the following:

  • Add the following lines to codecheck.yml, before the go build line
    (You can have multiple libraries by adding more lines)
build:
  - go get namespace.of/some/library