stepconf

package
v2.0.0-alpha.35 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2024 License: MIT Imports: 9 Imported by: 81

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotStructPtr = errors.New("must be a pointer to a struct")

ErrNotStructPtr indicates a type is not a pointer to a struct.

Functions

func Print

func Print(config interface{})

Print the name of the struct with Title case in blue color with followed by a newline, then print all fields formatted as `- field name: field value` separated by newline.

Types

type InputParser

type InputParser interface {
	Parse(input interface{}) error
}

InputParser ...

func NewInputParser

func NewInputParser(envRepository env.Repository) InputParser

NewInputParser ...

type ParseError

type ParseError struct {
	Field string
	Value string
	Err   error
}

ParseError occurs when a struct field cannot be set.

func (*ParseError) Error

func (e *ParseError) Error() string

Error implements builtin errors.Error.

type Secret

type Secret string

Secret variables are not shown in the printed output.

func (Secret) String

func (s Secret) String() string

String implements fmt.Stringer.String. When a Secret is printed, it's masking the underlying string with asterisks.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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