Documentation ¶
Index ¶
- Constants
- func Example()
- func ExampleLocalCache()
- func ExampleLocalConfig()
- func ExampleMakePath()
- func ExampleRefresh()
- func ExampleSystemConfig()
- func LocalCache(folder ...string) string
- func LocalConfig(folder ...string) string
- func Refresh()
- func SystemConfig(folder ...string) []string
- type Config
Constants ¶
const ( DefaultNTPAllowedDifference = 50000000 DefaultNTPAllowedNegativeDifference = 50000000 DefaultFileMode = os.FileMode(0755) )
Variables ¶
This section is empty.
Functions ¶
func ExampleLocalCache ¶
func ExampleLocalCache()
ExampleLocalCache example for getting a user-specific cache folder.
func ExampleLocalConfig ¶
func ExampleLocalConfig()
ExampleLocalConfig example for getting a user-specific configuration path.
func ExampleMakePath ¶
func ExampleMakePath()
ExampleMakePath example for automatically creating config directories.
func ExampleRefresh ¶
func ExampleRefresh()
ExampleRefresh example for recalculating what the directories should be.
func ExampleSystemConfig ¶
func ExampleSystemConfig()
ExampleSystemConfig example for getting a global system configuration path.
func LocalCache ¶
LocalCache returns the local user cache folder, with optional path components added to the end for vendor/application-specific settings.
func LocalConfig ¶
LocalConfig returns the local user configuration path, with optional path components added to the end for vendor/application-specific settings.
func SystemConfig ¶
SystemConfig returns the system-wide configuration paths, with optional path components added to the end for vendor/application-specific settings.
Types ¶
type Config ¶
type Config struct { ConfigDir string GoMaxProcessors int LogConfig *log.Config DatabaseConfig *database.Config WebserverConfig *webserver.Config }
func NewConfig ¶
NewConfig will create the Config object and set the default data paths for the application.
func (*Config) GetDataPath ¶
GetDataPath gets the data path for the given sub-path