From f52005974e1b72c3e9975b971b1c9b75edbbc8e6 Mon Sep 17 00:00:00 2001 From: Jeremy Gustie Date: Mon, 12 Dec 2022 11:16:19 -0500 Subject: [PATCH] Remove the --user-agent flag from the watch activity command --- pkg/command/activity.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/pkg/command/activity.go b/pkg/command/activity.go index bdc0644..a121fc6 100644 --- a/pkg/command/activity.go +++ b/pkg/command/activity.go @@ -95,7 +95,6 @@ func NewWatchActivityCommand(cfg Config) *cobra.Command { feedTemplateText string itemTemplateText string - userAgent string ) cmd := &cobra.Command{ @@ -109,7 +108,6 @@ func NewWatchActivityCommand(cfg Config) *cobra.Command { cmd.Flags().BoolVar(&deleteItems, "delete", false, "delete new items") cmd.Flags().StringVar(&feedTemplateText, "feed-template", `{{ template "ActivityFeed" . }}`, "the feed `template` used to render the activity feed") cmd.Flags().StringVar(&itemTemplateText, "item-template", `{{ template "ActivityItem" . }}`, "the item `template` used to render the items") - cmd.Flags().StringVar(&userAgent, "user-agent", "", "override the User-Agent `header` used when making requests") cmd.Flag("feed-template").Hidden = true cmd.Flag("item-template").Hidden = true cmd.Flag("user-agent").Hidden = true @@ -146,11 +144,6 @@ func NewWatchActivityCommand(cfg Config) *cobra.Command { return err } - // Override the user agent for debugging - if userAgent != "" { - ctx = context.WithValue(ctx, "User-Agent", userAgent) - } - s := &applications.PollingSubscriber{ API: applications.NewAPI(client), PollInterval: pollInterval,