Skip to content

Commit

Permalink
Merge pull request #9 from tigerteufel85/boggy-1/cron-optional-second…
Browse files Browse the repository at this point in the history
…s-field

Fix optional seconds field for cron time
  • Loading branch information
tigerteufel85 committed Apr 3, 2020
2 parents 3e2d7a8 + f27027a commit e0003f6
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions command/schedule_add.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"fmt"
"github.com/tigerteufel85/boggy/client"
"github.com/tigerteufel85/boggy/config"
"regexp"
"strings"

"github.com/nlopes/slack"
Expand Down Expand Up @@ -86,9 +85,6 @@ func (c *scheduleAdd) Execute(ctx context.Context, b *bot.Bot, eventText string,
}
time = strings.Join(timeFields, " ")

var re = regexp.MustCompile("^([\\S]+)")
time = re.ReplaceAllString(strings.Trim(time, " "), "0")

if !b.IsValidSchedule(time) {
c.slackClient.Respond(event, fmt.Sprintf("I'm sorry, but \"%s\" is not a valid schedule. Please check *@boggy help schedule>* for more information", time))
return true
Expand Down

0 comments on commit e0003f6

Please sign in to comment.