浏览代码

Fix mispelling

Luke Scott 9 年之前
父节点
当前提交
6c23101832
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      parser.go

+ 3 - 3
parser.go

@@ -18,7 +18,7 @@ const (
 	Dom
 	Dom
 	Month
 	Month
 	Dow
 	Dow
-	DowOptinal
+	DowOptional
 	Descriptor
 	Descriptor
 )
 )
 
 
@@ -47,7 +47,7 @@ type Parser struct {
 
 
 func NewParser(options ParseOption) Parser {
 func NewParser(options ParseOption) Parser {
 	optionals := 0
 	optionals := 0
-	if options&DowOptinal > 0 {
+	if options&DowOptional > 0 {
 		options |= Dow
 		options |= Dow
 		optionals++
 		optionals++
 	}
 	}
@@ -120,7 +120,7 @@ func expandFields(fields []string, options ParseOption) []string {
 }
 }
 
 
 var defaultParser = NewParser(
 var defaultParser = NewParser(
-	Second | Minute | Hour | Dom | Month | DowOptinal | Descriptor,
+	Second | Minute | Hour | Dom | Month | DowOptional | Descriptor,
 )
 )
 
 
 // Parse returns a new crontab schedule representing the given spec.
 // Parse returns a new crontab schedule representing the given spec.