github.com/nozzle/golangci-lint@v1.49.0-nz3/test/testdata/fix/out/whitespace.go (about) 1 //golangcitest:args -Ewhitespace 2 //golangcitest:config_path testdata/configs/whitespace-fix.yml 3 //golangcitest:expected_exitcode 0 4 package p 5 6 import "fmt" 7 8 func oneLeadingNewline() { 9 fmt.Println("Hello world") 10 } 11 12 func oneNewlineAtBothEnds() { 13 fmt.Println("Hello world") 14 } 15 16 func noNewlineFunc() { 17 } 18 19 func oneNewlineFunc() { 20 21 } 22 23 func twoNewlinesFunc() { 24 25 26 } 27 28 func noNewlineWithCommentFunc() { 29 // some comment 30 } 31 32 func oneTrailingNewlineWithCommentFunc() { 33 // some comment 34 35 } 36 37 func oneLeadingNewlineWithCommentFunc() { 38 39 // some comment 40 } 41 42 func twoLeadingNewlines() { 43 44 fmt.Println("Hello world") 45 } 46 47 func multiFuncFunc(a int, 48 b int) { 49 50 fmt.Println("Hello world") 51 } 52 53 func multiIfFunc() { 54 if 1 == 1 && 55 2 == 2 { 56 57 fmt.Println("Hello multi-line world") 58 } 59 }