save surfer - delete heat

This commit is contained in:
Linux User 2023-12-30 19:25:11 +00:00
parent 35b24c95e1
commit 6b86375ce9
6 changed files with 45 additions and 12 deletions

View file

@ -10,13 +10,12 @@ import (
)
type Athlete struct {
Firstname string `json:"firstname"`
Lastname string `json:"lastname"`
Category string `json:"category"`
Name string `json:"name"`
Category string `json:"category"`
}
func surferName(athlete Athlete) string {
str := fmt.Sprintf("%s.%s.%s", athlete.Firstname, athlete.Lastname, athlete.Category)
str := fmt.Sprintf("%s.%s", athlete.Name, athlete.Category)
str = strings.ReplaceAll(str, " ", "_")
return str
}