-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch to flexible semester detection
- Loading branch information
Showing
3 changed files
with
235 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package main | ||
|
||
type DisciplineSemester struct { | ||
Semester int | ||
DisciplineId int | ||
} | ||
|
||
type DisciplineSemesters []DisciplineSemester | ||
|
||
func (disciplines DisciplineSemesters) Has(disciplineId int) bool { | ||
for _, discipline := range disciplines { | ||
if discipline.DisciplineId == disciplineId { | ||
return true | ||
} | ||
} | ||
return false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.