cfg

package
v0.31.3 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KeyRecent        = "recent"
	KeyServerPort    = "server_port"
	KeyEditorCommand = "editor_command"
	KeyUpdateChannel = "update_channel"
	KeyCacheDir      = "templates_dir"
	KeyRegistryDir   = "registry_dir"
	KeyRegistryUrl   = "registry_url"
	KeyVersion       = "version"
	KeyCommit        = "commit"
	KeyDate          = "date"
)

Variables

This section is empty.

Functions

func AllSettings

func AllSettings() map[string]interface{}

func AppendRecentEntry

func AppendRecentEntry(value string) error

AppendRecentEntry appends a new entry to the list of recent entries entries are limited to 5 the most recent entry is at the beginning of the list stores the list in the config file

func BuildCommit

func BuildCommit() string

func BuildDate

func BuildDate() string

func BuildVersion

func BuildVersion() string

func CacheDir added in v0.29.0

func CacheDir() string

func ConfigDir

func ConfigDir() string

func ConfigFileUsed

func ConfigFileUsed() string

func EditorCommand

func EditorCommand() string

func Get

func Get(key string) any

func GetString

func GetString(key string) string

func IsSet

func IsSet(key string) bool

func NewConfig

func NewConfig(cfgDir string) (*viper.Viper, error)

func RecentEntries

func RecentEntries() []string

RecentEntries returns the list of recent entries

func RegistryCachePath

func RegistryCachePath() string

func RegistryDir

func RegistryDir() string

func RegistryUrl

func RegistryUrl() string

func RemoveRecentEntry

func RemoveRecentEntry(value string) error

RemoveRecentEntry removes a recent entry from the list

func ServerPort

func ServerPort() string

func Set

func Set(key string, value any)

func SetBuildInfo

func SetBuildInfo(version, commit, date string)

func SetConfig

func SetConfig(c *viper.Viper)

func UpdateChannel

func UpdateChannel() string

func WriteConfig

func WriteConfig() error

Types

This section is empty.

Jump to

Keyboard shortcuts

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