github.com/golangci/go-tools@v0.0.0-20190318060251-af6baa5dc196/staticcheck/testdata/src/CheckMissingEnumTypesInDeclaration/CheckMissingEnumTypesInDeclaration.go (about) 1 package pkg 2 3 const c1 int = 0 4 const c2 = 0 5 6 const ( 7 c3 int = iota 8 c4 9 c5 10 ) 11 12 const ( 13 c6 int = 1 // MATCH "only the first constant in this group has an explicit type" 14 c7 = 2 15 c8 = 3 16 ) 17 18 const ( 19 c9 int = 1 20 c10 = 2 21 c11 = 3 22 c12 int = 4 23 ) 24 25 const ( 26 c13 = 1 27 c14 int = 2 28 c15 int = 3 29 c16 int = 4 30 ) 31 32 const ( 33 c17 = 1 34 c18 int = 2 35 c19 = 3 36 c20 int = 4 37 ) 38 39 const ( 40 c21 int = 1 41 42 c22 = 2 43 ) 44 45 const ( 46 c23 int = 1 47 c24 int = 2 48 49 c25 string = "" // MATCH "only the first constant in this group has an explicit type" 50 c26 = "" 51 52 c27 = 1 53 c28 int = 2 54 55 c29 int = 1 56 c30 = 2 57 c31 int = 2 58 59 c32 string = "" // MATCH "only the first constant in this group has an explicit type" 60 c33 = "" 61 ) 62 63 const ( 64 c34 int = 1 // MATCH "only the first constant in this group has an explicit type" 65 c35 = 2 66 67 c36 int = 2 68 )