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
+5 -5
View File
@@ -11,14 +11,14 @@ type Single struct {
} `json:"results"`
}
func (s *Single) GetTitle() string {
func (s *Single) Title() string {
if s.Results.Data == nil {
return ""
}
return s.Results.Data.GetTitle()
return s.Results.Data.FullTitle()
}
func (s *Single) GetTracks() []*Track {
func (s *Single) Tracks() []*Track {
if s.Results.Data == nil {
return nil
}
@@ -27,10 +27,10 @@ func (s *Single) GetTracks() []*Track {
func (s *Single) SetTracks(tracks []*Track) {}
func (s *Single) GetOutputDir(outputDir string) string {
func (s *Single) OutputDir(outputDir string) string {
return path.Join(outputDir, "Singles")
}
func (s *Single) Unmarshal(data []byte) error {
func (s *Single) decode(data []byte) error {
return json.Unmarshal(data, s)
}