gc
github.com/galdor/go-cmdline
go get github.com/galdor/go-cmdline
gc

github.com/galdor/go-cmdline

A command line parser written in Go

by Nicolas Martyanoff

v1.2.0 (see all)License:ISC
go get github.com/galdor/go-cmdline
Readme

go-cmdline

Introduction

cmdline is a Go library to parse command line options (with optional default values), arguments and subcommands.

Usage

The following example is the simplest cmdline application possible:

package main

import (
    "os"

    "github.com/galdor/go-cmdline"
)

func main() {
    cl := cmdline.New()
    cl.Parse(os.Args)
}

The resulting application handles -h and --help.

The examples directory contains examples for the various features of cmdline. You can run them with go run. Feel free to copy and use these examples in your own application.

Contact

If you have an idea or a question, email me at khaelin@gmail.com.

GitHub Stars

12

LAST COMMIT

1yr ago

MAINTAINERS

0

CONTRIBUTORS

2

OPEN ISSUES

0

OPEN PRs

0
VersionTagPublished
v1.2.0
6mos ago
v1.1.2-0.20210629140542-11e0707a838f
1yr ago
v1.1.2-0.20190825174830-b602c32ef217
1yr ago
v1.1.1-0.20181217212330-f6df57bc77ea
2yrs ago
No alternatives found
No tutorials found
Add a tutorial