config

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrConfigNotFound = errors.New("config not found")
	ErrConfigInvalid  = errors.New("config invalid")
)

Functions

This section is empty.

Types

type App

type App struct {
	Paths []Path `json:"paths" toml:"paths"`
}

Read from file

type Config

type Config interface {
	Install(appNames ...string) error
	Update(appNames ...string) error
	Clean() error
	Diff(appNames ...string) error
	Validate(appNames ...string) error
	List() []string
}

func LoadConfig

func LoadConfig(path string, isDryRun bool) (Config, error)

LoadConfig return config, configDemo

type ConfigApps added in v0.13.0

type ConfigApps struct {
	Apps       map[string]App `json:"apps" toml:"apps"`
	SortedApps []string       `json:"-" toml:"-"`
}

type Path

type Path struct {
	Internal string `json:"internal" toml:"internal"`
	External string `json:"external,omitempty" toml:"external"`
}

Jump to

Keyboard shortcuts

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