gitee.com/wgliang/goreporter@v0.0.0-20180902115603-df1b20f7c5d0/linters/golint/testdata/sort.go (about) 1 // Test that we don't ask for comments on sort.Interface methods. 2 3 // Package pkg ... 4 package pkg 5 6 // T is ... 7 type T []int 8 9 // Len by itself should get documented. 10 11 func (t T) Len() int { return len(t) } // MATCH /exported method T\.Len.*should.*comment/ 12 13 // U is ... 14 type U []int 15 16 func (u U) Len() int { return len(u) } 17 func (u U) Less(i, j int) bool { return u[i] < u[j] } 18 func (u U) Swap(i, j int) { u[i], u[j] = u[j], u[i] } 19 20 func (u U) Other() {} // MATCH /exported method U\.Other.*should.*comment/