Skip to content

Commit

Permalink
fix(send): use StringArray flag for url to not split on commas (#129)
Browse files Browse the repository at this point in the history
  • Loading branch information
piksel committed Jan 28, 2021
1 parent 84ec2ed commit 568c1bc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cli/cmd/send/send.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (

cli "github.com/containrrr/shoutrrr/cli/cmd"
u "github.com/containrrr/shoutrrr/internal/util"
"github.com/containrrr/shoutrrr/pkg/types"
"github.com/containrrr/shoutrrr/pkg/router"
"github.com/containrrr/shoutrrr/pkg/types"
"github.com/containrrr/shoutrrr/pkg/util"
)

Expand All @@ -26,7 +26,7 @@ var Cmd = &cobra.Command{
func init() {
Cmd.Flags().BoolP("verbose", "v", false, "")

Cmd.Flags().StringSliceP("url", "u", []string{}, "The notification url")
Cmd.Flags().StringArrayP("url", "u", []string{}, "The notification url")
_ = Cmd.MarkFlagRequired("url")

Cmd.Flags().StringP("message", "m", "", "The message to send to the notification url")
Expand All @@ -39,7 +39,7 @@ func init() {
func Run(cmd *cobra.Command, _ []string) {
verbose, _ := cmd.Flags().GetBool("verbose")

urls, _ := cmd.Flags().GetStringSlice("url")
urls, _ := cmd.Flags().GetStringArray("url")
message, _ := cmd.Flags().GetString("message")
title, _ := cmd.Flags().GetString("title")

Expand Down

0 comments on commit 568c1bc

Please sign in to comment.