1
0
mirror of https://github.com/taigrr/godns synced 2025-01-18 04:03:25 -08:00

fix golint warnings

This commit is contained in:
Timothy 2017-10-30 14:53:42 +08:00
parent cd798db786
commit ebb174f604
2 changed files with 6 additions and 1 deletions

View File

@ -16,7 +16,9 @@ var (
configuration godns.Settings
optConf = flag.String("c", "./config.json", "Specify a config file")
optHelp = flag.Bool("h", false, "Show help")
Version = "0.1"
// Version is current version of GoDNS
Version = "0.1"
)
func main() {

View File

@ -12,6 +12,7 @@ import (
)
var (
// Logo for GoDNS
Logo = `
@ -86,10 +87,12 @@ func CheckSettings(config *Settings) error {
return nil
}
// SaveCurrentIP saves current IP into a template file
func SaveCurrentIP(currentIP string) {
ioutil.WriteFile("./.current_ip", []byte(currentIP), os.FileMode(0644))
}
// LoadCurrentIP loads saved IP from template file
func LoadCurrentIP() string {
content, err := ioutil.ReadFile("./.current_ip")