flags

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2021 License: MIT Imports: 8 Imported by: 39

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend struct {
	// contains filtered or unexported fields
}

Backend that loads configuration from the command line flags.

func NewBackend

func NewBackend() *Backend

NewBackend creates a flags backend.

func (*Backend) Get

func (b *Backend) Get(ctx context.Context, key string) ([]byte, error)

Get is not implemented.

func (*Backend) LoadStruct

func (b *Backend) LoadStruct(ctx context.Context, cfg *confita.StructConfig) error

LoadStruct takes a struct config, define flags based on it and parse the command line args.

func (*Backend) Name

func (b *Backend) Name() string

Name returns the name of the flags backend.

Jump to

Keyboard shortcuts

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