model

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromMap

func FromMap[T any](m map[string]any) (T, error)

FromNMap converts m to T. See https://pkg.go.dev/github.com/mitchellh/mapstructure#section-readme

Types

type BasicError

type BasicError struct {
	Msg string `toml:"msg"`
}

BasicError holds an error message.

func NewBasicError

func NewBasicError(what string, err error) *BasicError

func (BasicError) Error

func (r BasicError) Error() string

type BuildContext

type BuildContext struct {
	Project string `toml:"project"`
	Tag     string `toml:"ref"`
	Goos    string `toml:"goos"`
	Goarch  string `toml:"goarch"`
}

type Initializer

type Initializer interface {
	// Init initializes a config struct, that could be parsing of strings into Go objects, compiling of Glob patterns etc.
	// It returns an error if the initialization failed.
	Init() error
}

Jump to

Keyboard shortcuts

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