Skip to content

Commit 6a8421b

Browse files
vankofalconrobfig
authored andcommitted
fix readme custom parser example
1 parent 208b4f7 commit 6a8421b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎README.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ It is backwards incompatible with both v1 and v2. These updates are required:
7070
cron.New(cron.WithSeconds())
7171

7272
// Seconds field, optional
73-
cron.New(
74-
cron.WithParser(
75-
cron.SecondOptional | cron.Minute | cron.Hour | cron.Dom | cron.Month | cron.Dow | cron.Descriptor))
73+
cron.New(cron.WithParser(cron.NewParser(
74+
cron.SecondOptional | cron.Minute | cron.Hour | cron.Dom | cron.Month | cron.Dow | cron.Descriptor,
75+
)))
7676
```
7777
- The Cron type now accepts functional options on construction rather than the
7878
previous ad-hoc behavior modification mechanisms (setting a field, calling a setter).

0 commit comments

Comments
 (0)