a96ab60e2b265e5995fe49234aef18eaadb38443
[dotfiles/.git] / CheckContextFirstArg.go
1 // Package pkg ...
2 package pkg
3
4 import "context"
5
6 type T int
7
8 func fn1(int)                                   {}
9 func fn2(context.Context, int)                  {}
10 func fn3(context.Context, int, context.Context) {}
11 func fn4(int, context.Context)                  {} // want `context\.Context should be the first argument of a function`
12 func (T) FN(int, context.Context)               {} // want `context\.Context should be the first argument of a function`