Documentation ¶
Index ¶
- Constants
- func FilePath(v *viper.Viper) (string, error)
- func ImportFilePath(v *viper.Viper) (string, error)
- func InternalFilePath(v *viper.Viper) (string, error)
- func ReadInConfig(v *viper.Viper, configFilePath string) error
- func WakaResourcesDir() (string, error)
- type WakaHomeType
- type Writer
- type WriterConfig
Constants ¶
View Source
const ( // DateFormat is the default format for date in config file. DateFormat = time.RFC3339 )
Variables ¶
This section is empty.
Functions ¶
func ImportFilePath ¶ added in v1.42.1
ImportFilePath returns the path for import wakatime config file.
func InternalFilePath ¶ added in v1.30.3
InternalFilePath returns the path for the wakatime internal config file.
func ReadInConfig ¶ added in v1.30.3
ReadInConfig reads wakatime config file in memory.
func WakaResourcesDir ¶ added in v1.73.0
WakaResourcesDir returns the ~/.wakatime/ folder.
Types ¶
type WakaHomeType ¶ added in v1.73.0
type WakaHomeType int
WakaHomeType is WakaTime home type.
const ( // WakaHomeTypeUnknown is unknown WakaTime home type. WakaHomeTypeUnknown WakaHomeType = iota // WakaHomeTypeEnvVar is WakaTime home type from environment variable. WakaHomeTypeEnvVar // WakaHomeTypeOSDir is WakaTime home type from OS directory. WakaHomeTypeOSDir )
func WakaHomeDir ¶ added in v1.30.3
func WakaHomeDir() (string, WakaHomeType, error)
WakaHomeDir returns the current user's home directory.
type WriterConfig ¶ added in v1.30.3
type WriterConfig struct { ConfigFilepath string File *ini.File }
WriterConfig stores the configuration necessary to write to config file.
Click to show internal directories.
Click to hide internal directories.