99 "os/exec"
1010 "strings"
1111
12- . "github.com/onsi/ginkgo/v2" //nolint:golint,revive
12+ ginkgo "github.com/onsi/ginkgo/v2" //nolint:golint,revive
1313)
1414
1515const (
@@ -22,7 +22,7 @@ const (
2222)
2323
2424func warnError (err error ) {
25- _ , _ = fmt .Fprintf (GinkgoWriter , "warning: %v\n " , err )
25+ _ , _ = fmt .Fprintf (ginkgo . GinkgoWriter , "warning: %v\n " , err )
2626}
2727
2828// Run executes the provided command within this context
@@ -31,12 +31,12 @@ func Run(cmd *exec.Cmd) (string, error) {
3131 cmd .Dir = dir
3232
3333 if err := os .Chdir (cmd .Dir ); err != nil {
34- _ , _ = fmt .Fprintf (GinkgoWriter , "chdir dir: %s\n " , err )
34+ _ , _ = fmt .Fprintf (ginkgo . GinkgoWriter , "chdir dir: %s\n " , err )
3535 }
3636
3737 cmd .Env = append (os .Environ (), "GO111MODULE=on" )
3838 command := strings .Join (cmd .Args , " " )
39- _ , _ = fmt .Fprintf (GinkgoWriter , "running: %s\n " , command )
39+ _ , _ = fmt .Fprintf (ginkgo . GinkgoWriter , "running: %s\n " , command )
4040 output , err := cmd .CombinedOutput ()
4141 if err != nil {
4242 return string (output ), fmt .Errorf ("%s failed with error: (%v) %s" , command , err , string (output ))
@@ -182,7 +182,7 @@ func GetProjectDir() (string, error) {
182182 if err != nil {
183183 return wd , err
184184 }
185- wd = strings .Replace (wd , "/test/e2e" , "" , - 1 )
185+ wd = strings .ReplaceAll (wd , "/test/e2e" , "" )
186186 return wd , nil
187187}
188188
0 commit comments