Fixed linting issues

Signed-off-by: naving1989 <navinag1989@gmail.com>
pull/31033/head
naving1989 2 months ago
parent 3b2f9e7d6f
commit 4310b2bc36

@ -35,7 +35,7 @@ type mockGetter struct {
err error err error
} }
func (m *mockGetter) Get(url string, options ...getter.Option) (*bytes.Buffer, error) { func (m *mockGetter) Get(_ string, _ ...getter.Option) (*bytes.Buffer, error) {
if m.err != nil { if m.err != nil {
return nil, m.err return nil, m.err
} }
@ -87,6 +87,7 @@ func TestReadFile(t *testing.T) {
filePath: "test.txt", filePath: "test.txt",
providers: getter.Providers{}, providers: getter.Providers{},
setupFunc: func(t *testing.T) (string, func()) { setupFunc: func(t *testing.T) (string, func()) {
t.Helper()
tmpDir := t.TempDir() tmpDir := t.TempDir()
filePath := filepath.Join(tmpDir, "test.txt") filePath := filepath.Join(tmpDir, "test.txt")
content := []byte("local file content") content := []byte("local file content")
@ -147,6 +148,7 @@ func TestReadFile(t *testing.T) {
mockProvider([]string{"http"}, []byte("should not be used"), nil), mockProvider([]string{"http"}, []byte("should not be used"), nil),
}, },
setupFunc: func(t *testing.T) (string, func()) { setupFunc: func(t *testing.T) (string, func()) {
t.Helper()
// Create a local file named "ftp://example.com/file.txt" // Create a local file named "ftp://example.com/file.txt"
// This tests the fallback behavior when scheme is not supported // This tests the fallback behavior when scheme is not supported
tmpDir := t.TempDir() tmpDir := t.TempDir()

Loading…
Cancel
Save