Documentation ¶
Index ¶
- Constants
- Variables
- func BoolString(b bool) string
- func Contains(list []string, item string) bool
- func Dedupe(list []string) []string
- func DeleteCredentials() error
- func FileExists(path string) bool
- func Filter(list []string, filter func(string) bool) []string
- func GetCredentialsPath() (string, error)
- func HumanizeBytes(bytes uint64) string
- func IndexOf(list []string, item string) int
- func IsDir(path string) bool
- func LoadCredentials() (string, error)
- func Paren(s string) string
- func ParseBool(s string) bool
- func Quote(s string) string
- func StoreCredentials(apiKey string) error
- func YesNo(b bool) string
Constants ¶
View Source
const ( CfgKeyName = "PublicName" CfgKeyDesc = "PublicDescription" CfgKeyPub = "Public" CfgKeyPass = "Password" CfgKeyMax = "MaxPlayers" CfgKeyMods = "Mods" CfgKeyItems = "WorkshopItems" CfgKeyMap = "Map" )
Variables ¶
View Source
var ( Info = color.New(color.FgBlue).Sprint("INFO") Warning = color.New(color.FgYellow).Sprint("WARNING") Error = color.New(color.FgRed).Sprint("ERROR") OK = color.New(color.FgGreen).Sprint("OK") Yes = color.New(color.FgGreen).Sprint("YES") No = color.New(color.FgRed).Sprint("NO") Bold = color.New(color.Bold).SprintFunc() Underline = color.New(color.Underline).SprintFunc() )
View Source
var ( ErrFileNotFound = errors.New("file not found") ErrFileExists = errors.New("file already exists") ErrInvalidKey = errors.New("invalid key") ErrVerNotSet = errors.New("version not set") ErrNoApiKey = errors.New("no Steam API key set") ErrNoCredFile = errors.New("no credentials file found") )
Functions ¶
func BoolString ¶
func DeleteCredentials ¶
func DeleteCredentials() error
func FileExists ¶
func GetCredentialsPath ¶
func HumanizeBytes ¶
func LoadCredentials ¶
func StoreCredentials ¶
Types ¶
This section is empty.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.