config

package
Version: v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BindFlags

func BindFlags(cmd *cobra.Command, flags []Flag) (err error)

BindFlags will bind each flag to cobra's command, so it can extract them

Types

type Flag

type Flag struct {
	Name      string
	Type      Type
	Shorthand string
	Value     interface{}
	Usage     string
}

Flag structure for flags in configuration

type Type

type Type int

Type indicates the value type of a flag

const (
	// Bool value type for bool
	Bool Type = 1
	// Int value type for int
	Int Type = 2
	// String value type for string
	String Type = 3
	// StringSlice value type for []string
	StringSlice Type = 4
)

Source Files

Jump to

Keyboard shortcuts

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