1
0

Remove inteermidiate variable and instantiate struct in return statement.

This commit is contained in:
Alexander Andreev 2022-03-31 18:11:04 +04:00
parent 0d113d30a1
commit d3563abba1
Signed by: Arav
GPG Key ID: 1327FE8A374CC86F

View File

@ -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) {