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
|
||||
}
|
||||
|
||||
iceStat := &IcecastStatus{
|
||||
return &IcecastStatus{
|
||||
ServerStartISO8601: iceStatDTO.Icestats.ServerStartISO8601,
|
||||
ServerStartDate: iceStatDTO.Icestats.ServerStartDate,
|
||||
SongName: iceStatDTO.Song(),
|
||||
ListenerPeak: iceStatDTO.Icestats.Source.ListenerPeak,
|
||||
Listeners: iceStatDTO.Icestats.Source.Listeners,
|
||||
}
|
||||
|
||||
return iceStat, nil
|
||||
}, nil
|
||||
}
|
||||
|
||||
func IcecastLastPlayedSongs(lastNSongs int, playlistPath string) ([]Song, error) {
|
||||
|
Loading…
Reference in New Issue
Block a user