envvar

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ByDescription

type ByDescription []EnvVarInfo

func (ByDescription) Len

func (a ByDescription) Len() int

func (ByDescription) Less

func (a ByDescription) Less(i, j int) bool

func (ByDescription) Swap

func (a ByDescription) Swap(i, j int)

type EnvVar

type EnvVar struct {
	EnvVars []EnvVarInfo `toml:"env"`
}

func (*EnvVar) Load

func (envvars *EnvVar) Load() error

Load reads toml file.

func (*EnvVar) Order

func (envvars *EnvVar) Order()

Order snippets regarding SortBy option defined in config toml Prefix "-" reverses the order, default is "recency", "+<expressions>" is the same as "<expression>"

func (*EnvVar) Save

func (envvar *EnvVar) Save() error

Save saves the snippets to toml file.

func (*EnvVar) ToString

func (snippets *EnvVar) ToString() (string, error)

ToString returns the contents of toml file.

type EnvVarInfo

type EnvVarInfo struct {
	Description string   `toml:"description"`
	Variables   []string `toml:"variables"`
	Tag         []string `toml:"tag"`
}

func (*EnvVarInfo) GetVariables

func (envvar *EnvVarInfo) GetVariables() []string

Jump to

Keyboard shortcuts

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