required

command
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2021 License: MIT Imports: 3 Imported by: 0

README

Required

All fields that are annotated with the cfg tag but have no default value specified are treated as required variables. If for those parameters no value is given, neither via config-file nor via environment variable or command line argument, then reading the config will fail with an error.

type MyFontConfig struct {
    Color string `cfg:"{'name':'color','desc':'A required parameter (no default is defined)'}"`
}

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