cfg

package
v0.19.3 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KeyRecent        = "recent"
	KeyServerPort    = "server_port"
	KeyEditorCommand = "editor_command"
	KeyUpdateChannel = "update_channel"
	KeyTemplatesDir  = "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(file 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 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

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(d 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 TemplateCacheDir

func TemplateCacheDir() string

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