MCPcopy Create free account
hub / github.com/github/gh-aw / validateMinimumInterval

Function validateMinimumInterval

pkg/parser/schedule_parser.go:252–261  ·  view source on GitHub ↗
(interval int, unit string)

Source from the content-addressed store, hash-verified

250}
251
252func validateMinimumInterval(interval int, unit string) error {
253 totalMinutes, err := intervalToMinutes(interval, unit)
254 if err != nil {
255 return err
256 }
257 if totalMinutes < 5 {
258 return fmt.Errorf("minimum schedule interval is 5 minutes, got %d minute(s)", totalMinutes)
259 }
260 return nil
261}
262
263func intervalToMinutes(interval int, unit string) (int, error) {
264 switch unit {

Callers 2

parseLongIntervalMethod · 0.85

Calls 2

intervalToMinutesFunction · 0.85
ErrorfMethod · 0.45

Tested by

no test coverage detected