Skip to content
This repository has been archived by the owner on Jan 11, 2019. It is now read-only.

Commit

Permalink
Make original cron line exported
Browse files Browse the repository at this point in the history
  • Loading branch information
jianli committed Aug 17, 2018
1 parent cc9f595 commit e3f62c0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cronexpr.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
// A Expression represents a specific cron time expression as defined at
// <https://github.com/gorhill/cronexpr#implementation>
type Expression struct {
expression string
CronLine string
secondList []int
minuteList []int
hourList []int
Expand All @@ -45,7 +45,7 @@ type Expression struct {
}

func (expr Expression) String() string {
return fmt.Sprintf("(%s)", expr.expression)
return fmt.Sprintf("(%s)", expr.CronLine)
}

/******************************************************************************/
Expand Down Expand Up @@ -89,7 +89,7 @@ func Parse(cronLine string) (*Expression, error) {
var field = 0
var err error

expr.expression = cronLine
expr.CronLine = cron
// second field (optional)
if fieldCount == 7 {
err = expr.secondFieldHandler(cron[indices[field][0]:indices[field][1]])
Expand Down

0 comments on commit e3f62c0

Please sign in to comment.