Documentation ¶ Index ¶ func ToWorldsMap(wl []World) map[int]string type World type WorldList func Load(path string) (*WorldList, error) func NewFromSlice(ww []World) *WorldList func (wl *WorldList) All() []World func (wl *WorldList) ByID(id int) (World, bool) func (wl *WorldList) Default() World Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func ToWorldsMap ¶ func ToWorldsMap(wl []World) map[int]string Types ¶ type World ¶ type World struct { ID int `json:"id"` Name string `json:"name"` Address string `json:"address"` Port int `json:"port"` Region string `json:"region,omitempty"` PvPType string `json:"pvp_type,omitempty"` } type WorldList ¶ type WorldList struct { // contains filtered or unexported fields } func Load ¶ func Load(path string) (*WorldList, error) func NewFromSlice ¶ func NewFromSlice(ww []World) *WorldList func (*WorldList) All ¶ func (wl *WorldList) All() []World func (*WorldList) ByID ¶ func (wl *WorldList) ByID(id int) (World, bool) func (*WorldList) Default ¶ func (wl *WorldList) Default() World Source Files ¶ View all Source files worlds.go Click to show internal directories. Click to hide internal directories.