util

package
v0.0.0-...-35b150b Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const AppName = "czid-cli"

Variables

This section is empty.

Functions

func GetCacheDir

func GetCacheDir() (string, error)

GetCacheDir gets the cache directory for this application

func GetConfigDir

func GetConfigDir() (string, error)

GetConfigDir gets the config directory for this application

func MkdirIfNotExists

func MkdirIfNotExists(dirname string) error

MkdirIfNotExists makes a directory if it doesn't exist

func StringMapKeys

func StringMapKeys(m map[string]string) []string

func StringSliceContains

func StringSliceContains(slice []string, str string) bool

func TrimLeadingSlash

func TrimLeadingSlash(s string) string

TrimLeadingSlash trims the leading slash from a string if one is present

func Tune

func Tune()

func ViperCache

func ViperCache() (*viper.Viper, error)

ViperCache returns a viper instance backed by a file in the cache directory. If no such file or directory exists, one is created. It is safe to call this concurrently.

Types

This section is empty.

Jump to

Keyboard shortcuts

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