From 7e3e0be0aab0081275340cc8f920454fa7424e4b Mon Sep 17 00:00:00 2001 From: Xevion Date: Mon, 29 Jan 2024 15:55:14 -0600 Subject: [PATCH] Add binary marshal for Redis on Course struct --- types.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/types.go b/types.go index b499caf..7cb634b 100644 --- a/types.go +++ b/types.go @@ -1,6 +1,7 @@ package main import ( + "encoding/json" "fmt" "strconv" "strings" @@ -302,3 +303,7 @@ type Course struct { Faculty []FacultyItem `json:"faculty"` MeetingsFaculty []MeetingTimeResponse `json:"meetingsFaculty"` } + +func (course Course) MarshalBinary() ([]byte, error) { + return json.Marshal(course) +}