You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
func (hUniqueStringQueue) Swap(i, jint) { panic("Who called me?!?") }
37
+
38
+
func (h*UniqueStringQueue) Push(xinterface{}) {
39
+
if!sliceContains(*h, x.(string)) {
40
+
*h=append(*h, x.(string))
41
+
}
42
+
}
43
+
44
+
func (h*UniqueStringQueue) Pop() interface{} {
45
+
old:=*h
46
+
x:=old[0]
47
+
*h=old[1:]
48
+
returnx
49
+
}
50
+
51
+
func (h*UniqueStringQueue) Empty() bool {
52
+
returnh.Len() ==0
53
+
}
54
+
55
+
// duplication of utils.SliceContains! Thanks golang! Why? Because you can't have import cycles, so types cannot import from utils because utils already imports from types
func (hUniqueStringQueue) Swap(i, jint) { panic("Who called me?!?") }
165
-
166
-
func (h*UniqueStringQueue) Push(xinterface{}) {
167
-
if!SliceContains(*h, x.(string)) {
168
-
*h=append(*h, x.(string))
169
-
}
170
-
}
171
-
172
-
func (h*UniqueStringQueue) Pop() interface{} {
173
-
old:=*h
174
-
x:=old[0]
175
-
*h=old[1:]
176
-
returnx
177
-
}
178
-
179
-
func (h*UniqueStringQueue) Empty() bool {
180
-
returnh.Len() ==0
181
-
}
182
-
183
-
// duplication of utils.SliceContains! Thanks golang! Why? Because you can't have import cycles, so types cannot import from utils because utils already imports from types
0 commit comments