simple

command
v0.0.0-...-8135c48 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 16, 2016 License: MIT, MIT Imports: 2 Imported by: 0

README

simple example

<tmpl,code=go:cat simple.go>

package main

import (
	"fmt"

	"github.com/jpillora/opts"
)

type Config struct {
	Foo string
	Bar string
}

func main() {
	c := Config{}
	opts.Parse(&c)
	fmt.Println(c.Foo)
	fmt.Println(c.Bar)
}
``` $ simple --foo hello --bar world ``` ``` plain hello world ``` ``` $ simple --help ``` ``` plain

Usage: simple [options]

Options: --foo, -f --bar, -b --help, -h

</tmpl>

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL