@@ -21,8 +21,8 @@ const (
21
21
PreventRefresh
22
22
)
23
23
24
- func (r RefreshStrategy ) String () string {
25
- switch r {
24
+ func (r * RefreshStrategy ) String () string {
25
+ switch * r {
26
26
case AutoRefresh :
27
27
return "auto"
28
28
case ForceRefresh :
@@ -37,8 +37,8 @@ func (r *RefreshStrategy) Allowed() string {
37
37
return "auto, force, prevent"
38
38
}
39
39
40
- func (r RefreshStrategy ) ShouldRefresh (expired bool ) bool {
41
- switch r {
40
+ func (r * RefreshStrategy ) ShouldRefresh (expired bool ) bool {
41
+ switch * r {
42
42
43
43
case ForceRefresh :
44
44
slog .Info ("forcing a refresh" )
@@ -71,7 +71,7 @@ func (r *RefreshStrategy) Set(value string) error {
71
71
return nil
72
72
}
73
73
74
- func (r RefreshStrategy ) Type () string {
74
+ func (r * RefreshStrategy ) Type () string {
75
75
return "RefreshStrategy"
76
76
}
77
77
@@ -92,11 +92,11 @@ const (
92
92
ForceEnrich
93
93
)
94
94
95
- func (r ForceStrategy ) Has (s ForceStrategy ) bool {
96
- return r & s != 0
95
+ func (r * ForceStrategy ) Has (s ForceStrategy ) bool {
96
+ return * r & s != 0
97
97
}
98
98
99
- func (r ForceStrategy ) String () string {
99
+ func (r * ForceStrategy ) String () string {
100
100
s := []string {}
101
101
102
102
if r .Has (ForceApply ) {
@@ -114,7 +114,7 @@ func (r ForceStrategy) String() string {
114
114
return strings .Join (s , ", " )
115
115
}
116
116
117
- func (r ForceStrategy ) Allowed () string {
117
+ func (r * ForceStrategy ) Allowed () string {
118
118
return "apply, noop, enrich"
119
119
}
120
120
@@ -137,6 +137,6 @@ func (r *ForceStrategy) Set(value string) error {
137
137
return nil
138
138
}
139
139
140
- func (r ForceStrategy ) Type () string {
140
+ func (r * ForceStrategy ) Type () string {
141
141
return "ForceStrategy"
142
142
}
0 commit comments