From bf501d8731d67f272f835182a97a6b4c384a8a42 Mon Sep 17 00:00:00 2001 From: Ryan Leung Date: Mon, 5 Aug 2024 15:42:41 +0800 Subject: [PATCH] *: replace path with filepath (#8488) ref tikv/pd#8475 Signed-off-by: Ryan Leung Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com> --- pkg/dashboard/distroutil/distro.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/dashboard/distroutil/distro.go b/pkg/dashboard/distroutil/distro.go index 9eb1a2eb31b..a19db806d70 100644 --- a/pkg/dashboard/distroutil/distro.go +++ b/pkg/dashboard/distroutil/distro.go @@ -16,7 +16,7 @@ package distroutil import ( "os" - "path" + "path/filepath" "github.com/pingcap/log" "github.com/pingcap/tidb-dashboard/util/distro" @@ -36,7 +36,7 @@ func MustGetResPath() string { log.Fatal("failed to read the execution path", zap.Error(err)) return "" } - return path.Join(path.Dir(exePath), resFolderName) + return filepath.Join(filepath.Dir(exePath), resFolderName) } // MustLoadAndReplaceStrings loads the distro strings from ${BinaryPath}/distro-res/strings.json @@ -44,7 +44,7 @@ func MustGetResPath() string { // distro string will be used. func MustLoadAndReplaceStrings() { resPath := MustGetResPath() - strings, err := distro.ReadResourceStringsFromFile(path.Join(resPath, stringsFileName)) + strings, err := distro.ReadResourceStringsFromFile(filepath.Join(resPath, stringsFileName)) if err != nil { log.Fatal("failed to load distro strings", zap.Error(err)) }