docopt

command
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Command docopt demonstrates binding docopt to a struct via env.

It uses a simple implementation of env.Env to map environment variable names to docopt options (e.g. LOG_LEVEL -> --log-level), and to cast the limited types returned by docopt to strings.

USERNAME=bob go run docopt_example.go --cache-path /var/cache
// Output:
// CachePath=/var/cache
// Username=bob
// ...
// ...

Jump to

Keyboard shortcuts

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