-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgclueaccuracylevel_string.go
executable file
·42 lines (36 loc) · 1.21 KB
/
gclueaccuracylevel_string.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
// Code generated by "stringer -type=GClueAccuracyLevel -trimprefix=GClueAccuracyLevel"; DO NOT EDIT.
package geoclue2
import "strconv"
func _() {
// An "invalid array index" compiler error signifies that the constant values have changed.
// Re-run the stringer command to generate them again.
var x [1]struct{}
_ = x[GClueAccuracyLevelNone-0]
_ = x[GClueAccuracyLevelCountry-1]
_ = x[GClueAccuracyLevelCity-4]
_ = x[GClueAccuracyLevelNeighborhood-5]
_ = x[GClueAccuracyLevelStreet-6]
_ = x[GClueAccuracyLevelExact-8]
}
const (
_GClueAccuracyLevel_name_0 = "NoneCountry"
_GClueAccuracyLevel_name_1 = "CityNeighborhoodStreet"
_GClueAccuracyLevel_name_2 = "Exact"
)
var (
_GClueAccuracyLevel_index_0 = [...]uint8{0, 4, 11}
_GClueAccuracyLevel_index_1 = [...]uint8{0, 4, 16, 22}
)
func (i GClueAccuracyLevel) String() string {
switch {
case i <= 1:
return _GClueAccuracyLevel_name_0[_GClueAccuracyLevel_index_0[i]:_GClueAccuracyLevel_index_0[i+1]]
case 4 <= i && i <= 6:
i -= 4
return _GClueAccuracyLevel_name_1[_GClueAccuracyLevel_index_1[i]:_GClueAccuracyLevel_index_1[i+1]]
case i == 8:
return _GClueAccuracyLevel_name_2
default:
return "GClueAccuracyLevel(" + strconv.FormatInt(int64(i), 10) + ")"
}
}