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:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user