package konghcl
import "github.com/alecthomas/kong-hcl"
Index ¶
- Variables
- func DecodeValue(ctx *kong.DecodeContext, dest interface{}) error
- func Loader(r io.Reader) (kong.Resolver, error)
- type DumpConfig
- type Resolver
Variables ¶
var ( // DumpIgnoreFlags specifies a set of flags that should not be dumped. DumpIgnoreFlags = map[string]bool{ "help": true, "version": true, "dump-config": true, "env": true, "validate-config": true, } )
Functions ¶
func DecodeValue ¶
func DecodeValue(ctx *kong.DecodeContext, dest interface{}) error
DecodeValue decodes Kong values into a Go structure.
func Loader ¶
Loader is a Kong configuration loader for HCL.
Types ¶
type DumpConfig ¶
type DumpConfig bool
DumpConfig can be added as a flag to dump HCL configuration.
func (DumpConfig) BeforeApply ¶
func (f DumpConfig) BeforeApply(app *kong.Kong) error
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
Resolver resolves kong Flags from configuration in HCL.
func (*Resolver) Resolve ¶
func (r *Resolver) Resolve(context *kong.Context, parent *kong.Path, flag *kong.Flag) (interface{}, error)
func (*Resolver) Validate ¶
func (r *Resolver) Validate(app *kong.Application) error
Source Files ¶
- Version
- v1.0.1 (latest)
- Published
- Mar 9, 2021
- Platform
- js/wasm
- Imports
- 10 packages
- Last checked
- now –
Tools for package owners.