config

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ENV_UNIVENV_CONFIG_DIR string = "UNIVENV_CONFIG_DIR"
	DEFAULT_FILE_BASENAME  string = "config"
	DEFAULT_FILE_EXT       string = ".yml"
)

Variables

View Source
var DEFAULT_DIR = filepath.Join(sysutil.HomeDir(), ".config", "univenv")

Functions

This section is empty.

Types

type Config

type Config struct {
	Items []item.Item `yaml:"items"`
}

func (*Config) GetEnableItems

func (c *Config) GetEnableItems(sh shell.Shell, os ostype.OS) []item.Item

func (*Config) Read

func (c *Config) Read(b []byte) error

func (*Config) Validate

func (c *Config) Validate() error

func (*Config) Write

func (c *Config) Write() ([]byte, error)

type ConfigOpener

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

func (*ConfigOpener) Dir

func (m *ConfigOpener) Dir() string

func (*ConfigOpener) FilePath

func (m *ConfigOpener) FilePath() string

func (*ConfigOpener) Open

func (m *ConfigOpener) Open() (*Config, error)

func (*ConfigOpener) SetFile

func (m *ConfigOpener) SetFile(path string)

func (*ConfigOpener) SetTarget

func (m *ConfigOpener) SetTarget(target string)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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