kongx

package
v0.0.42 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package kongx provides utility functions to github.com/alecthomas/kong such as parsing field value from a JSON file via the CustomMapper JSONFileMapper.

Index

Constants

This section is empty.

Variables

View Source
var JSONFileMapper = kong.MapperFunc(decodeJSONFile)

JSONFileMapper implements kong.MapperValue to decode a JSON file into a struct field.

var cli struct {
  Profile Profile `type:"jsonfile"`
}

func main() {
  kong.Parse(&cli, kong.NamedMapper("jsonfile", kongx.JSONFileMapper))
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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