Remove unuseful library

This commit is contained in:
Aleksey Dmitrevskiy 2019-02-27 16:19:45 +03:00
parent 3a9d436f8a
commit 141b14c94a
2 changed files with 3 additions and 5 deletions

1
go.mod
View File

@ -13,7 +13,6 @@ require (
github.com/kardianos/service v0.0.0-20181115005516-4c239ee84e7b
github.com/krolaw/dhcp4 v0.0.0-20180925202202-7cead472c414
github.com/miekg/dns v1.1.1
github.com/pkg/errors v0.8.0
github.com/shirou/gopsutil v2.18.10+incompatible
github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4 // indirect
github.com/stretchr/testify v1.2.2

View File

@ -1,7 +1,6 @@
package main
import (
"errors"
"fmt"
"io/ioutil"
"os"
@ -149,7 +148,7 @@ func upgradeSchema2to3(diskConfig *map[string]interface{}) error {
// Let's read dns configuration from diskConfig
dnsConfig, ok := (*diskConfig)["dns"]
if !ok {
return errors.New("no DNS configuration in config file")
return fmt.Errorf("no DNS configuration in config file")
}
// Convert interface{} to map[string]interface{}
@ -161,7 +160,7 @@ func upgradeSchema2to3(diskConfig *map[string]interface{}) error {
newDNSConfig[fmt.Sprint(k)] = v
}
default:
return errors.New("DNS configuration is not a map")
return fmt.Errorf("DNS configuration is not a map")
}
// Replace bootstrap_dns value filed with new array contains old bootstrap_dns inside
@ -170,7 +169,7 @@ func upgradeSchema2to3(diskConfig *map[string]interface{}) error {
(newDNSConfig)["bootstrap_dns"] = newBootstrapConfig
(*diskConfig)["dns"] = newDNSConfig
} else {
return errors.New("no bootstrap DNS in DNS config")
return fmt.Errorf("no bootstrap DNS in DNS config")
}
// Bump schema version