diff --git a/build/ci.go b/build/ci.go index 750ede2421..f68a45fdc1 100644 --- a/build/ci.go +++ b/build/ci.go @@ -45,7 +45,6 @@ import ( "log" "os" "os/exec" - "path" "path/filepath" "runtime" "strings" @@ -377,7 +376,7 @@ func downloadProtocGenGo(cachedir string) string { url := fmt.Sprintf("https://github.com/protocolbuffers/protobuf-go/releases/download/v%s/%s", version, archiveName) - archivePath := path.Join(cachedir, archiveName) + archivePath := filepath.Join(cachedir, archiveName) if err := csdb.DownloadFile(url, archivePath); err != nil { log.Fatal(err) } diff --git a/internal/build/util.go b/internal/build/util.go index 4ba5135dd3..7334f409dd 100644 --- a/internal/build/util.go +++ b/internal/build/util.go @@ -23,7 +23,6 @@ import ( "log" "os" "os/exec" - "path" "path/filepath" "runtime" "strconv" @@ -116,7 +115,7 @@ func RunGit(args ...string) string { // readGitFile returns content of file in .git directory. func readGitFile(file string) string { - content, err := os.ReadFile(path.Join(".git", file)) + content, err := os.ReadFile(filepath.Join(".git", file)) if err != nil { return "" } diff --git a/internal/jsre/jsre_test.go b/internal/jsre/jsre_test.go index bb4ff5fa4f..18ef39e2f4 100644 --- a/internal/jsre/jsre_test.go +++ b/internal/jsre/jsre_test.go @@ -18,7 +18,7 @@ package jsre import ( "os" - "path" + "path/filepath" "reflect" "testing" "time" @@ -42,7 +42,7 @@ func (no *testNativeObjectBinding) TestMethod(call goja.FunctionCall) goja.Value func newWithTestJS(t *testing.T, testjs string) *JSRE { dir := t.TempDir() if testjs != "" { - if err := os.WriteFile(path.Join(dir, "test.js"), []byte(testjs), os.ModePerm); err != nil { + if err := os.WriteFile(filepath.Join(dir, "test.js"), []byte(testjs), os.ModePerm); err != nil { t.Fatal("cannot create test.js:", err) } } diff --git a/node/node_auth_test.go b/node/node_auth_test.go index 9f3503af76..ac51e3c51a 100644 --- a/node/node_auth_test.go +++ b/node/node_auth_test.go @@ -22,7 +22,7 @@ import ( "fmt" "net/http" "os" - "path" + "path/filepath" "testing" "time" @@ -98,7 +98,7 @@ func TestAuthEndpoints(t *testing.T) { t.Fatalf("failed to create jwt secret: %v", err) } // Geth must read it from a file, and does not support in-memory JWT secrets, so we create a temporary file. - jwtPath := path.Join(t.TempDir(), "jwt_secret") + jwtPath := filepath.Join(t.TempDir(), "jwt_secret") if err := os.WriteFile(jwtPath, []byte(hexutil.Encode(secret[:])), 0600); err != nil { t.Fatalf("failed to prepare jwt secret file: %v", err) }