Skip to content

Commit 32117e6

Browse files
committed
linter fixes
1 parent 56601c8 commit 32117e6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/run_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,13 +160,13 @@ func TestProcess_Success(t *testing.T) {
160160
// Create two temporary files with known content.
161161
file1Path := tempDir + "/file1.txt"
162162
content1 := []byte("hello world")
163-
if err := os.WriteFile(file1Path, content1, 0644); err != nil {
163+
if err := os.WriteFile(file1Path, content1, 0o644); err != nil {
164164
t.Fatalf("WriteFile error for file1: %v", err)
165165
}
166166

167167
file2Path := tempDir + "/file2.txt"
168168
content2 := []byte("Go testing!")
169-
if err := os.WriteFile(file2Path, content2, 0644); err != nil {
169+
if err := os.WriteFile(file2Path, content2, 0o644); err != nil {
170170
t.Fatalf("WriteFile error for file2: %v", err)
171171
}
172172

@@ -245,7 +245,7 @@ func TestProcess_Error(t *testing.T) {
245245
}
246246

247247
func contains(s, substr string) bool {
248-
return len(s) >= len(substr) && (s == substr || (len(s) > 0 && indexOf(s, substr) >= 0))
248+
return len(s) >= len(substr) && (s == substr || (s != "" && indexOf(s, substr) >= 0))
249249
}
250250

251251
func indexOf(s, substr string) int {

0 commit comments

Comments
 (0)