github.com/elek/golangci-lint@v1.42.2-0.20211208090441-c05b7fcb3a9a/test/testdata/fix/out/whitespace.go (about) 1 //args: -Ewhitespace 2 //config: linters-settings.whitespace.multi-if=true 3 //config: linters-settings.whitespace.multi-func=true 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 }