mirror of
https://github.com/taigrr/godns
synced 2025-01-18 04:03:25 -08:00
fix golint warnings
This commit is contained in:
parent
cd798db786
commit
ebb174f604
@ -16,7 +16,9 @@ var (
|
|||||||
configuration godns.Settings
|
configuration godns.Settings
|
||||||
optConf = flag.String("c", "./config.json", "Specify a config file")
|
optConf = flag.String("c", "./config.json", "Specify a config file")
|
||||||
optHelp = flag.Bool("h", false, "Show help")
|
optHelp = flag.Bool("h", false, "Show help")
|
||||||
Version = "0.1"
|
|
||||||
|
// Version is current version of GoDNS
|
||||||
|
Version = "0.1"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
3
utils.go
3
utils.go
@ -12,6 +12,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
// Logo for GoDNS
|
||||||
Logo = `
|
Logo = `
|
||||||
|
|
||||||
██████╗ ██████╗ ██████╗ ███╗ ██╗███████╗
|
██████╗ ██████╗ ██████╗ ███╗ ██╗███████╗
|
||||||
@ -86,10 +87,12 @@ func CheckSettings(config *Settings) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SaveCurrentIP saves current IP into a template file
|
||||||
func SaveCurrentIP(currentIP string) {
|
func SaveCurrentIP(currentIP string) {
|
||||||
ioutil.WriteFile("./.current_ip", []byte(currentIP), os.FileMode(0644))
|
ioutil.WriteFile("./.current_ip", []byte(currentIP), os.FileMode(0644))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// LoadCurrentIP loads saved IP from template file
|
||||||
func LoadCurrentIP() string {
|
func LoadCurrentIP() string {
|
||||||
content, err := ioutil.ReadFile("./.current_ip")
|
content, err := ioutil.ReadFile("./.current_ip")
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user