github.com/ldez/golangci-lint@v1.10.1/pkg/result/processors/testdata/nolint2.go (about)

     1  package testdata
     2  
     3  import (
     4  	"bytes"
     5  	"io"
     6  )
     7  
     8  func noTransitiveExpanding() {
     9  	//nolint:errcheck
    10  	var buf io.Writer = &bytes.Buffer{}
    11  	buf.Write([]byte("123"))
    12  }
    13  
    14  func nolintFuncByInlineCommentDoesNotWork() { //nolint:errcheck
    15  	var buf io.Writer = &bytes.Buffer{}
    16  	buf.Write([]byte("123"))
    17  }