Skip to content

jobteaser-oss/go-cmdline

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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() {
	cmdline := cmdline.New()
	cmdline.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 [email protected].

About

A command line parser written in Go

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%