MCPcopy Index your code
hub / github.com/coder/coder / daysMap

Function daysMap

coderd/schedule/template.go:77–84  ·  view source on GitHub ↗

daysMap returns a map of the days of the week that are specified in the bitmap.

(daysOfWeek uint8)

Source from the content-addressed store, hash-verified

75// daysMap returns a map of the days of the week that are specified in the
76// bitmap.
77func daysMap(daysOfWeek uint8) map[time.Weekday]bool {
78 days := make(map[time.Weekday]bool)
79 for i, day := range DaysOfWeek {
80 // #nosec G115 - Safe conversion, i ranges from 0-6 for days of the week
81 days[day] = daysOfWeek&(1<<uint(i)) != 0
82 }
83 return days
84}
85
86// VerifyTemplateAutostopRequirement returns an error if the autostop
87// requirement is invalid.

Callers 2

DaysMapMethod · 0.85
DaysMapMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected