Skip to content

Commit

Permalink
Remove deprecated --schedule-{id,name}s CLI flags
Browse files Browse the repository at this point in the history
This is in favor of --schedule.
  • Loading branch information
timoreimann committed Jan 4, 2021
1 parent fedde1c commit 941b164
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 18 deletions.
6 changes: 0 additions & 6 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,6 @@ func singleSlackSync(p params) (config, error) {
}
slackSync.Schedules = append(slackSync.Schedules, cfgSchedule)
}
for _, scheduleID := range p.scheduleIDs {
slackSync.Schedules = append(slackSync.Schedules, ConfigSchedule{ID: scheduleID})
}
for _, scheduleName := range p.scheduleNames {
slackSync.Schedules = append(slackSync.Schedules, ConfigSchedule{Name: scheduleName})
}

return config{
SlackSyncs: []ConfigSlackSync{slackSync},
Expand Down
10 changes: 0 additions & 10 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,6 @@ By default, the program will terminate after a single run. Use the --daemon flag
Name: "schedule",
Usage: "name of a PageDuty schedule to sync periodically (can be repeated to define several schedules); syntax: id|name=<schedule reference>[;userGroup=id|name|handle=<user group reference>..]",
},
&cli.StringSliceFlag{
Name: "schedule-names",
Usage: "names of PageDuty schedules to sync periodically (DEPRECATED: use \"schedule\" instead)",
},
&cli.StringSliceFlag{
Name: "schedule-ids",
Usage: "IDs of PageDuty schedules to sync periodically (DEPRECATED: use \"schedule\" instead)",
},
&cli.StringFlag{
Name: "channel-name",
Usage: "the name of the channel to post topic updates to",
Expand Down Expand Up @@ -113,8 +105,6 @@ By default, the program will terminate after a single run. Use the --daemon flag
},
Action: func(c *cli.Context) error {
p.schedules = c.StringSlice("schedule")
p.scheduleNames = c.StringSlice("schedule-names")
p.scheduleIDs = c.StringSlice("schedule-ids")
if c.IsSet("dry-run") {
p.dryRun = &dryRun
}
Expand Down
2 changes: 0 additions & 2 deletions params.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import "time"
type params struct {
config string
schedules []string
scheduleNames []string
scheduleIDs []string
channelName string
channelID string
tmplString string
Expand Down

0 comments on commit 941b164

Please sign in to comment.