Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigExist ¶
func Home ¶
func Home() string
Home returns the home directory for the executing user.
This uses an OS-specific method for discovering the home directory. An error is returned if a home directory cannot be detected.
func ReplaceConfig ¶
func ReplaceConfig(fileName string, conf ConfigParam) (bool, error)
Types ¶
type ConfigParam ¶
type ConfigParam struct { Port int64 `json:"port"` Host string `json:"host"` Key string `json:"key"` }
func LoadConfig ¶
func LoadConfig(filepath string) (ConfigParam, error)
Click to show internal directories.
Click to hide internal directories.