.*: fix lint errors
Fix SA4032 and SA3000 which are flagged after bumping to go1.23rc1 and v0.5.0-rc1 of go-tools. Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com>
This commit is contained in:
		| @@ -24,7 +24,6 @@ import ( | |||||||
| 	"os/signal" | 	"os/signal" | ||||||
| 	"path/filepath" | 	"path/filepath" | ||||||
| 	"regexp" | 	"regexp" | ||||||
| 	"runtime" |  | ||||||
| 	"syscall" | 	"syscall" | ||||||
| 	"testing" | 	"testing" | ||||||
| 	"time" | 	"time" | ||||||
| @@ -69,9 +68,6 @@ func TestContainerNameFromProcCgroup(t *testing.T) { | |||||||
| } | } | ||||||
|  |  | ||||||
| func TestPidOf(t *testing.T) { | func TestPidOf(t *testing.T) { | ||||||
| 	if runtime.GOOS == "darwin" || runtime.GOOS == "windows" { |  | ||||||
| 		t.Skipf("not supported on GOOS=%s", runtime.GOOS) |  | ||||||
| 	} |  | ||||||
| 	pids, err := PidOf(filepath.Base(os.Args[0])) | 	pids, err := PidOf(filepath.Base(os.Args[0])) | ||||||
| 	assert.Empty(t, err) | 	assert.Empty(t, err) | ||||||
| 	assert.NotZero(t, pids) | 	assert.NotZero(t, pids) | ||||||
| @@ -79,9 +75,6 @@ func TestPidOf(t *testing.T) { | |||||||
| } | } | ||||||
|  |  | ||||||
| func TestPKill(t *testing.T) { | func TestPKill(t *testing.T) { | ||||||
| 	if runtime.GOOS == "darwin" || runtime.GOOS == "windows" { |  | ||||||
| 		t.Skipf("not supported on GOOS=%s", runtime.GOOS) |  | ||||||
| 	} |  | ||||||
| 	sig := syscall.SIGCONT | 	sig := syscall.SIGCONT | ||||||
| 	c := make(chan os.Signal, 1) | 	c := make(chan os.Signal, 1) | ||||||
| 	signal.Notify(c, sig) | 	signal.Notify(c, sig) | ||||||
| @@ -98,10 +91,6 @@ func TestPKill(t *testing.T) { | |||||||
| } | } | ||||||
|  |  | ||||||
| func BenchmarkGetPids(b *testing.B) { | func BenchmarkGetPids(b *testing.B) { | ||||||
| 	if runtime.GOOS == "darwin" || runtime.GOOS == "windows" { |  | ||||||
| 		b.Skipf("not supported on GOOS=%s", runtime.GOOS) |  | ||||||
| 	} |  | ||||||
|  |  | ||||||
| 	re, err := regexp.Compile("(^|/)" + filepath.Base(os.Args[0]) + "$") | 	re, err := regexp.Compile("(^|/)" + filepath.Base(os.Args[0]) + "$") | ||||||
| 	assert.Empty(b, err) | 	assert.Empty(b, err) | ||||||
|  |  | ||||||
|   | |||||||
| @@ -21,6 +21,7 @@ package logger_test | |||||||
|  |  | ||||||
| import ( | import ( | ||||||
| 	"flag" | 	"flag" | ||||||
|  | 	"os" | ||||||
| 	"testing" | 	"testing" | ||||||
|  |  | ||||||
| 	"k8s.io/component-base/logs/example" | 	"k8s.io/component-base/logs/example" | ||||||
| @@ -49,5 +50,5 @@ func TestMain(m *testing.M) { | |||||||
| 	ktesting.DefaultConfig = ktesting.NewConfig(ktesting.Verbosity(2)) | 	ktesting.DefaultConfig = ktesting.NewConfig(ktesting.Verbosity(2)) | ||||||
| 	ktesting.DefaultConfig.AddFlags(flag.CommandLine) | 	ktesting.DefaultConfig.AddFlags(flag.CommandLine) | ||||||
| 	flag.Parse() | 	flag.Parse() | ||||||
| 	m.Run() | 	os.Exit(m.Run()) | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Madhav Jivrajani
					Madhav Jivrajani