Remove inteermidiate variable and instantiate struct in return statement.
This commit is contained in:
parent
0d113d30a1
commit
d3563abba1
@ -55,15 +55,13 @@ func IcecastGetStatus(icecastURL string) (*IcecastStatus, error) {
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
iceStat := &IcecastStatus{
|
return &IcecastStatus{
|
||||||
ServerStartISO8601: iceStatDTO.Icestats.ServerStartISO8601,
|
ServerStartISO8601: iceStatDTO.Icestats.ServerStartISO8601,
|
||||||
ServerStartDate: iceStatDTO.Icestats.ServerStartDate,
|
ServerStartDate: iceStatDTO.Icestats.ServerStartDate,
|
||||||
SongName: iceStatDTO.Song(),
|
SongName: iceStatDTO.Song(),
|
||||||
ListenerPeak: iceStatDTO.Icestats.Source.ListenerPeak,
|
ListenerPeak: iceStatDTO.Icestats.Source.ListenerPeak,
|
||||||
Listeners: iceStatDTO.Icestats.Source.Listeners,
|
Listeners: iceStatDTO.Icestats.Source.Listeners,
|
||||||
}
|
}, nil
|
||||||
|
|
||||||
return iceStat, nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func IcecastLastPlayedSongs(lastNSongs int, playlistPath string) ([]Song, error) {
|
func IcecastLastPlayedSongs(lastNSongs int, playlistPath string) ([]Song, error) {
|
||||||
|
Loading…
Reference in New Issue
Block a user