move models, views, and controllers to root
This commit is contained in:
parent
f0d29126ab
commit
96cc64464f
21 changed files with 190 additions and 203 deletions
21
model/artist.go
Normal file
21
model/artist.go
Normal file
|
@ -0,0 +1,21 @@
|
|||
package model
|
||||
|
||||
type (
|
||||
Artist struct {
|
||||
ID string `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Website string `json:"website"`
|
||||
Avatar string `json:"avatar"`
|
||||
}
|
||||
)
|
||||
|
||||
func (artist Artist) GetWebsite() string {
|
||||
return artist.Website
|
||||
}
|
||||
|
||||
func (artist Artist) GetAvatar() string {
|
||||
if artist.Avatar == "" {
|
||||
return "/img/default-avatar.png"
|
||||
}
|
||||
return artist.Avatar
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue