style: rename accessors to idiomatic names

This commit is contained in:
Mathis Maquenne
2026-08-05 11:47:53 +02:00
parent 88319ebb3c
commit f8b301e24c
16 changed files with 46 additions and 46 deletions
+4 -4
View File
@@ -18,11 +18,11 @@ type Artist struct {
} `json:"results"`
}
func (a *Artist) GetTitle() string {
func (a *Artist) Title() string {
return a.Results.Data.Name
}
func (a *Artist) GetTracks() []*Track {
func (a *Artist) Tracks() []*Track {
return a.Results.Tracks.Data
}
@@ -30,11 +30,11 @@ func (a *Artist) SetTracks(t []*Track) {
a.Results.Tracks.Data = t
}
func (a *Artist) GetOutputDir(outputDir string) string {
func (a *Artist) OutputDir(outputDir string) string {
base, _ := filenamify.Filenamify(a.Results.Data.Name, filenamify.Options{})
return path.Join(outputDir, base)
}
func (a *Artist) Unmarshal(data []byte) error {
func (a *Artist) decode(data []byte) error {
return json.Unmarshal(data, a)
}