Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SortRikishiByRank ¶
SortRikishiByRank takes a list of Rikishi's and sorts it by rank.
Types ¶
type Bout ¶
type Bout struct { BashoID int Day int Boutnum int Division int EastRikishiID int EastRikishiName string EastWin bool WestRikishiID int WestRikishiName string WestWin bool Kimarite string }
Bout represents a single bout between two rikishi.
type Division ¶
Division Represents a division of sumo wrestlers. Each division contains an ID, the full name, a short version of the name, and a Regex string used to confirm if a rank is in said division.
func GetDivision ¶
GetDivision returns the requested division if it exists, or nil if it doesnt. Divisions can be requested by either their short or long forms
func GetDivisionByRank ¶
GetDivisionByRank Checks the provided rank string against the rank regex of the divisions. returns the division and nil if the rank string matches any regex pattern.
func GetDivisionList ¶
GetDivisionList takes in a list of requested divisions and
type Rank ¶
Rank is a model used to make it easier to compare rikishi. it is not used in the rikishi model because strings suffice in most situations.
func CreateRankModelFromString ¶
CreateRankModelFromString takes a string and attempts to convert it into a rank struct. will return an error if anything in the process goes wrong.