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

code-check/cli-template-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •