diff --git a/control/plugin_manager.go b/control/plugin_manager.go index 31791074a..fb9af8e60 100644 --- a/control/plugin_manager.go +++ b/control/plugin_manager.go @@ -26,7 +26,6 @@ import ( "errors" "fmt" "os" - "path" "path/filepath" "runtime" "strconv" @@ -324,7 +323,7 @@ func (p *pluginManager) LoadPlugin(details *pluginDetails, emitter gomit.Emitter // run from. commands := make([]string, len(lPlugin.Details.Exec)) for i, e := range lPlugin.Details.Exec { - commands[i] = path.Join(lPlugin.Details.ExecPath, e) + commands[i] = filepath.Join(lPlugin.Details.ExecPath, e) } ePlugin, err := plugin.NewExecutablePlugin( p.GenerateArgs(int(log.GetLevel())), diff --git a/mgmt/rest/common/common.go b/mgmt/rest/common/common.go index a09f0712a..a7bbfb745 100644 --- a/mgmt/rest/common/common.go +++ b/mgmt/rest/common/common.go @@ -3,7 +3,7 @@ package common import ( "io/ioutil" "os" - "path" + "path/filepath" "runtime" log "github.com/Sirupsen/logrus" @@ -17,7 +17,7 @@ func WriteFile(filename string, b []byte) (string, error) { return "", err } - f, err := os.Create(path.Join(dir, filename)) + f, err := os.Create(filepath.Join(dir, filename)) if err != nil { return "", err }