From 41df26928c3f7f31d6621fb62aed1335c8675679 Mon Sep 17 00:00:00 2001 From: wish Date: Sat, 11 Mar 2023 23:34:19 +1100 Subject: [PATCH] remove useless time initialisers --- common/mhfcourse/mhfcourse.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/common/mhfcourse/mhfcourse.go b/common/mhfcourse/mhfcourse.go index 848d84c48..a1c12f8b5 100644 --- a/common/mhfcourse/mhfcourse.go +++ b/common/mhfcourse/mhfcourse.go @@ -44,7 +44,6 @@ func Courses() []Course { courses := make([]Course, 32) for i := range courses { courses[i].ID = uint16(i) - courses[i].Expiry = time.Time{} } return courses } @@ -65,7 +64,7 @@ func CourseExists(ID uint16, c []Course) bool { // GetCourseStruct returns a slice of Course(s) from a rights integer func GetCourseStruct(rights uint32) ([]Course, uint32) { - resp := []Course{{ID: 1, Expiry: time.Time{}}} + resp := []Course{{ID: 1}} s := Courses() slices.SortStableFunc(s, func(i, j Course) bool { return i.ID > j.ID @@ -79,14 +78,14 @@ func GetCourseStruct(rights uint32) ([]Course, uint32) { break } normalCafeCourseSet = true - resp = append(resp, Course{ID: 25, Expiry: time.Time{}}) + resp = append(resp, Course{ID: 25}) fallthrough case 9: if netcafeCourseSet { break } netcafeCourseSet = true - resp = append(resp, Course{ID: 30, Expiry: time.Time{}}) + resp = append(resp, Course{ID: 30}) } course.Expiry = time.Date(2030, 1, 1, 0, 0, 0, 0, time.FixedZone("UTC+9", 9*60*60)) resp = append(resp, course)