Added golangci-lint configuration and prepared for the integrattion
This commit is contained in:
committed by
Eugene Bujak
parent
69a75fbcaa
commit
ec6b1f7c42
8
dhcp.go
8
dhcp.go
@@ -101,9 +101,9 @@ func handleDHCPInterfaces(w http.ResponseWriter, r *http.Request) {
|
||||
MTU: ifaces[i].MTU,
|
||||
HardwareAddr: ifaces[i].HardwareAddr.String(),
|
||||
}
|
||||
addrs, err := ifaces[i].Addrs()
|
||||
if err != nil {
|
||||
httpError(w, http.StatusInternalServerError, "Failed to get addresses for interface %v: %s", ifaces[i].Name, err)
|
||||
addrs, errAddrs := ifaces[i].Addrs()
|
||||
if errAddrs != nil {
|
||||
httpError(w, http.StatusInternalServerError, "Failed to get addresses for interface %v: %s", ifaces[i].Name, errAddrs)
|
||||
return
|
||||
}
|
||||
for _, addr := range addrs {
|
||||
@@ -155,7 +155,7 @@ func handleDHCPFindActiveServer(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
func startDHCPServer() error {
|
||||
if config.DHCP.Enabled == false {
|
||||
if !config.DHCP.Enabled {
|
||||
// not enabled, don't do anything
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user