github.com/vanstinator/golangci-lint@v0.0.0-20240223191551-cc572f00d9d1/test/testdata/inamedparam.go (about)

     1  //golangcitest:args -Einamedparam
     2  package testdata
     3  
     4  import "context"
     5  
     6  type tStruct struct {
     7  	a int
     8  }
     9  
    10  type Doer interface {
    11  	Do() string
    12  }
    13  
    14  type NamedParam interface {
    15  	Void()
    16  
    17  	NoArgs() string
    18  
    19  	WithName(ctx context.Context, number int, toggle bool, tStruct *tStruct, doer Doer) (bool, error)
    20  
    21  	WithoutName(
    22  		context.Context, // want "interface method WithoutName must have named param for type context.Context"
    23  		int, // want "interface method WithoutName must have named param for type int"
    24  		bool, // want "interface method WithoutName must have named param for type bool"
    25  		tStruct, // want "interface method WithoutName must have named param for type tStruct"
    26  		Doer, // want "interface method WithoutName must have named param for type Doer"
    27  		struct{ b bool }, // want "interface method WithoutName must have all named params"
    28  	)
    29  }