mirror of
https://github.com/Xevion/banner.git
synced 2025-12-16 16:11:14 -06:00
Add binary marshal for Redis on Course struct
This commit is contained in:
5
types.go
5
types.go
@@ -1,6 +1,7 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
@@ -302,3 +303,7 @@ type Course struct {
|
|||||||
Faculty []FacultyItem `json:"faculty"`
|
Faculty []FacultyItem `json:"faculty"`
|
||||||
MeetingsFaculty []MeetingTimeResponse `json:"meetingsFaculty"`
|
MeetingsFaculty []MeetingTimeResponse `json:"meetingsFaculty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (course Course) MarshalBinary() ([]byte, error) {
|
||||||
|
return json.Marshal(course)
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user