diff --git a/cmd/godns/godns.go b/cmd/godns/godns.go index 2cb5b77..655b5cf 100644 --- a/cmd/godns/godns.go +++ b/cmd/godns/godns.go @@ -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() { diff --git a/utils.go b/utils.go index 908db3f..5ec76a3 100644 --- a/utils.go +++ b/utils.go @@ -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")