/
reusestdlibvars.go
89 lines (67 loc) · 1.95 KB
/
reusestdlibvars.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
//golangcitest:args -Ereusestdlibvars
package testdata
import "net/http"
func _200() {
_ = 200
}
func _200_1() {
var w http.ResponseWriter
w.WriteHeader(200) // ERROR `can use http.StatusOK instead "200"`
}
func sunday() {
_ = "Sunday" // ERROR `can use time.Sunday.String\(\) instead "Sunday"`
}
func monday() {
_ = "Monday" // ERROR `can use time.Monday.String\(\) instead "Monday"`
}
func tuesday() {
_ = "Tuesday" // ERROR `can use time.Tuesday.String\(\) instead "Tuesday"`
}
func wednesday() {
_ = "Wednesday" // ERROR `can use time.Wednesday.String\(\) instead "Wednesday"`
}
func thursday() {
_ = "Thursday" // ERROR `can use time.Thursday.String\(\) instead "Thursday"`
}
func friday() {
_ = "Friday" // ERROR `can use time.Friday.String\(\) instead "Friday"`
}
func saturday() {
_ = "Saturday" // ERROR `can use time.Saturday.String\(\) instead "Saturday"`
}
func january() {
_ = "January" // ERROR `can use time.January.String\(\) instead "January"`
}
func february() {
_ = "February" // ERROR `can use time.February.String\(\) instead "February"`
}
func march() {
_ = "March" // ERROR `can use time.March.String\(\) instead "March"`
}
func april() {
_ = "April" // ERROR `can use time.April.String\(\) instead "April"`
}
func may() {
_ = "May" // ERROR `can use time.May.String\(\) instead "May"`
}
func june() {
_ = "June" // ERROR `can use time.June.String\(\) instead "June"`
}
func july() {
_ = "July" // ERROR `can use time.July.String\(\) instead "July"`
}
func august() {
_ = "August" // ERROR `can use time.August.String\(\) instead "August"`
}
func september() {
_ = "September" // ERROR `can use time.September.String\(\) instead "September"`
}
func october() {
_ = "October" // ERROR `can use time.October.String\(\) instead "October"`
}
func november() {
_ = "November" // ERROR `can use time.November.String\(\) instead "November"`
}
func december() {
_ = "December" // ERROR `can use time.December.String\(\) instead "December"`
}