Pull request: all: fix lint and naming issues vol. 4

Merge in DNS/adguard-home from 2276-fix-lint-4 to master

Updates #2276.

Squashed commit of the following:

commit 15d49184cd8ce1f8701bf3221e69418ca1778b36
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Tue Dec 8 15:51:34 2020 +0300

    util: fix naming

commit 3b9a86a0feb8c6e0b167e6e23105e8137b0dda76
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Tue Dec 8 15:41:10 2020 +0300

    all: fix lint and naming issues vol. 4
This commit is contained in:
Ainar Garipov
2020-12-08 16:01:13 +03:00
parent b7bf7f78df
commit 73c30590e0
10 changed files with 12 additions and 23 deletions

View File

@@ -9,7 +9,6 @@ import (
"io/ioutil"
"os"
"os/exec"
"path"
"runtime"
"strings"
)
@@ -41,13 +40,6 @@ func RunCommand(command string, arguments ...string) (int, string, error) {
return cmd.ProcessState.ExitCode(), string(out), nil
}
func FuncName() string {
pc := make([]uintptr, 10) // at least 1 entry needed
runtime.Callers(2, pc)
f := runtime.FuncForPC(pc[0])
return path.Base(f.Name())
}
// SplitNext - split string by a byte and return the first chunk
// Skip empty chunks
// Whitespace is trimmed

View File

@@ -1,7 +1,6 @@
package util
import (
"log"
"testing"
)
@@ -19,6 +18,6 @@ func TestGetValidNetInterfacesForWeb(t *testing.T) {
t.Fatalf("No addresses found for %s", iface.Name)
}
log.Printf("%v", iface)
t.Logf("%v", iface)
}
}