gorhill / cronexpr

Cron expression parser in Go language (golang)
683 stars 168 forks source link

Expose cron expression fields #38

Open brunoluiz opened 6 years ago

brunoluiz commented 6 years ago

With the actual implementation the developer can't do other operations using the parsed cron expression. In this pull request I expose the Expression struct fields, which enables the developer to use the previously private fields.

Example:

expr := "0,10,20,30,40,50 4 * * *"
cron := cronexpr.MustParse(expr)
log.Info(cron.MinuteList)