forked from astrotools/swego
-
Notifications
You must be signed in to change notification settings - Fork 0
/
planet_string.go
35 lines (30 loc) · 1.17 KB
/
planet_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
// Code generated by "stringer -type=Planet"; DO NOT EDIT
package swego
import "fmt"
const (
_Planet_name_0 = "SunMoonMercuryVenusMarsJupiterSaturnUranusNeptunePlutoMeanNodeTrueNodeMeanApogeeOscuApogeeEarthChironPholusCeresPallasJunoVestaInterApogeeInterPerigee"
_Planet_name_1 = "CupidoHadesZeusKronosApollonAdmetosVulkanusPoseidonIsisNibiruHarringtonNeptuneLeverrierNeptuneAdamsPlutoLowellPlutoPickeringVulcanWhiteMoonProserpinaWaldemath"
_Planet_name_2 = "Nessus"
_Planet_name_3 = "Varuna"
)
var (
_Planet_index_0 = [...]uint8{0, 3, 7, 14, 19, 23, 30, 36, 42, 49, 54, 62, 70, 80, 90, 95, 101, 107, 112, 118, 122, 127, 138, 150}
_Planet_index_1 = [...]uint8{0, 6, 11, 15, 21, 28, 35, 43, 51, 55, 61, 71, 87, 99, 110, 124, 130, 139, 149, 158}
_Planet_index_2 = [...]uint8{0, 6}
_Planet_index_3 = [...]uint8{0, 6}
)
func (i Planet) String() string {
switch {
case 0 <= i && i <= 22:
return _Planet_name_0[_Planet_index_0[i]:_Planet_index_0[i+1]]
case 40 <= i && i <= 58:
i -= 40
return _Planet_name_1[_Planet_index_1[i]:_Planet_index_1[i+1]]
case i == 17066:
return _Planet_name_2
case i == 30000:
return _Planet_name_3
default:
return fmt.Sprintf("Planet(%d)", i)
}
}