浏览代码

Fix parser comment about the required fields

Timo Linna 12 年之前
父节点
当前提交
d4118d68ea
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      parser.go

+ 3 - 3
parser.go

@@ -19,14 +19,14 @@ func Parse(spec string) Schedule {
 		return parseDescriptor(spec)
 	}
 
-	// Split on whitespace.  We require 4 or 5 fields.
-	// (minute) (hour) (day of month) (month) (day of week, optional)
+	// Split on whitespace.  We require 5 or 6 fields.
+	// (second) (minute) (hour) (day of month) (month) (day of week, optional)
 	fields := strings.Fields(spec)
 	if len(fields) != 5 && len(fields) != 6 {
 		log.Panicf("Expected 5 or 6 fields, found %d: %s", len(fields), spec)
 	}
 
-	// If a fifth field is not provided (DayOfWeek), then it is equivalent to star.
+	// If a sixth field is not provided (DayOfWeek), then it is equivalent to star.
 	if len(fields) == 5 {
 		fields = append(fields, "*")
 	}