package model import "fmt" type Pokemon struct { ID int `json:"id"` DexNumber int `json:"dex_number"` Name string `json:"name"` Shiny bool `json:"shiny"` Url string `json:"url"` Variations []Pokemon `json:"variations, omitempty"` } func (p *Pokemon) FormatUrl() { p.Url = fmt.Sprintf("image/%s", p.Url) }