async www read write
This commit is contained in:
@@ -63,12 +63,12 @@ func MakeRandom(name string, max int) (*Playlist, error) {
|
||||
return p, nil;
|
||||
}
|
||||
|
||||
func (p *Playlist) Encode() string {
|
||||
|
||||
pp := p.Pretty()
|
||||
res, _ := json.Marshal(pp)
|
||||
return string(res)
|
||||
|
||||
func (mp *MinimalPlaylist) Encode() []byte {
|
||||
res, err := json.Marshal(mp)
|
||||
if err != nil {
|
||||
return nil
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
func Decode(jsonstr string) (*Playlist, error) {
|
||||
|
||||
Reference in New Issue
Block a user