Documentation ¶
Overview ¶
Package config provides the build information, configuration for the application.
Index ¶
Constants ¶
View Source
const ( // DefaultConfigFile is the default configuration file name. DefaultConfigFile = "setting.yaml" // DefaultPort is the default port number of the web server. HACK: uint32 is used to avoid viper's bug for uint16. DefaultPort = uint32(8080) )
View Source
const (
// LicenseKey is the license key of the application.
LicenseKey = "A7KS7-Q95TX-3AFQB-F6VFF-NP2KW"
)
Variables ¶
View Source
var ( // AppName is the name of the application. AppName = "nb1" // CIBuildNum is the build number of the application on Continuous Integration system. CIBuildNum string // BuildDate is the date of the application build. BuildDate string // BuildHost is the host/machine name of the application build. BuildHost string // GoVersion is the version of Go used to build the application. i.e. go version GoVersion string // GitBranch is the git branch name of the application source code. i.e. git symbolic-ref -q --short HEAD GitBranch string // GitCommit is the git commit hash of the application source code. i.e. git rev-parse --short HEAD GitCommit string // GitSummary is the git summary of the application source code. i.e. git describe --tags --dirty --always GitSummary string )
View Source
var ( // AppLogoArt is the ASCII art of the application logo. Use `kfiglet nb1 -f ansishadow -p 2 | pbcopy` to generate. AppLogoArt = `` /* 203-byte string literal not displayed */ )
Functions ¶
func GetColorMap ¶
GetColorMap returns the predefined colors map.
func GetContentDir ¶
func GetContentDir() string
GetContentDir returns the filesystem path to the content directory.
func GetPreferredDevice ¶
func GetPreferredDevice() string
GetPreferredDevice returns the preferred device name for blink(1).
func SetDefaults ¶
func SetDefaults()
SetDefaults sets the default values in Viper for the configuration.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.