Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/samugi/simple-clargs

Simple module to manage command line args in go
https://github.com/samugi/simple-clargs

Last synced: 23 days ago
JSON representation

Simple module to manage command line args in go

Awesome Lists containing this project

README

        

# simple-clargs
Simple module to manage command line args in go

## Example usage
```
OptionInput := clargs.New("-i", "--input", "Input file path", true, true)
OptionOutput := clargs.New("-o", "--output", "Ouput file path", true, false)

options := []*clargs.Option{&OptionInput, &OptionOutput}
args := os.Args[1:]

usage := "./executable [options...]"

clargs.Init(usage, options, args)
clargs.CheckArgs()
```