diff --git a/pkg/auth/auth.go b/pkg/auth/auth.go index 756391c..66013a2 100644 --- a/pkg/auth/auth.go +++ b/pkg/auth/auth.go @@ -126,7 +126,7 @@ func startWebServer(redirectURL string) chan string { _ = listener.Close() w.Header().Set("Content-Type", "text/plain") _, _ = fmt.Fprintf( - w, "Received code: %v\r\nYou can now safely close this window.", code, + w, "Received code: %s\r\nYou can now safely close this window.", code, ) }, ), @@ -138,7 +138,7 @@ func startWebServer(redirectURL string) chan string { func getCodeFromPrompt(authURL string) (code string) { fmt.Printf( "It seems that your browser is not open. Go to the following "+ - "link in your browser:\n%v\n", authURL, + "link in your browser:\n%s\n", authURL, ) fmt.Print(manualInputHint) _, err := fmt.Scan(&code) @@ -159,7 +159,7 @@ func getTokenFromWeb(config *oauth2.Config, authURL string) *oauth2.Token { if err := utils.OpenURL(authURL); err == nil { fmt.Printf( "Your browser has been opened to an authorization URL. This "+ - "program will resume once authorization has been provided.\n%v\n", + "program will resume once authorization has been provided.\n%s\n", authURL, ) code = <-codeCh @@ -169,7 +169,7 @@ func getTokenFromWeb(config *oauth2.Config, authURL string) *oauth2.Token { code = getCodeFromPrompt(authURL) } - fmt.Printf("Authorization code generated: %v\n", code) + fmt.Printf("Authorization code generated: %s\n", code) token, err := config.Exchange(context.TODO(), code) if err != nil { log.Fatalln(errors.Join(errExchange, err)) diff --git a/pkg/auth/service.go b/pkg/auth/service.go index f665811..543e19a 100644 --- a/pkg/auth/service.go +++ b/pkg/auth/service.go @@ -25,7 +25,7 @@ const missingClientSecretsHint string = ` Please configure OAuth 2.0 To make this sample run, you need to populate the client_secrets.json file found at: - %v + %s with information from the {{ Google Cloud Console }} {{ https://cloud.google.com/console }} For more information about the client_secrets.json file format, please visit: diff --git a/pkg/channelSection/channelSection.go b/pkg/channelSection/channelSection.go index 1812a80..2597b35 100644 --- a/pkg/channelSection/channelSection.go +++ b/pkg/channelSection/channelSection.go @@ -83,7 +83,7 @@ func (cs *channelSection) List( case "yaml": utils.PrintYAML(channelSections, writer) default: - _, _ = fmt.Fprintln(writer, "ID\tChannelID\tTitle") + _, _ = fmt.Fprintln(writer, "ID\tChannelId\tTitle") for _, channelSection := range channelSections { _, _ = fmt.Fprintf( writer, "%s\t%s\t%s\n", channelSection.Id, diff --git a/pkg/commentThread/commentThread.go b/pkg/commentThread/commentThread.go index 4222455..882a654 100644 --- a/pkg/commentThread/commentThread.go +++ b/pkg/commentThread/commentThread.go @@ -109,7 +109,7 @@ func (c *commentThread) List( case "yaml": utils.PrintYAML(commentThreads, writer) default: - _, _ = fmt.Fprintln(writer, "ID\tTopLevelCommentID") + _, _ = fmt.Fprintln(writer, "ID\tTopLevelCommentId") for _, commentThread := range commentThreads { _, _ = fmt.Fprintf( writer, "%s\t%s\n", diff --git a/pkg/i18nLanguage/i18nLanguage.go b/pkg/i18nLanguage/i18nLanguage.go index 718628e..3d9e3bd 100644 --- a/pkg/i18nLanguage/i18nLanguage.go +++ b/pkg/i18nLanguage/i18nLanguage.go @@ -63,10 +63,10 @@ func (i *i18nLanguage) List( case "yaml": utils.PrintYAML(i18nLanguages, writer) default: - _, _ = fmt.Fprintln(writer, "id\thl\tname") + _, _ = fmt.Fprintln(writer, "ID\tHl\tName") for _, i18nLanguage := range i18nLanguages { _, _ = fmt.Fprintf( - writer, "%v\t%v\t%v\n", + writer, "%s\t%s\t%s\n", i18nLanguage.Id, i18nLanguage.Snippet.Hl, i18nLanguage.Snippet.Name, ) } diff --git a/pkg/i18nRegion/i18nRegion.go b/pkg/i18nRegion/i18nRegion.go index ab2df98..21b2be7 100644 --- a/pkg/i18nRegion/i18nRegion.go +++ b/pkg/i18nRegion/i18nRegion.go @@ -63,10 +63,10 @@ func (i *i18nRegion) List( case "yaml": utils.PrintYAML(i18nRegions, writer) default: - _, _ = fmt.Fprintln(writer, "ID\tgl\tname") + _, _ = fmt.Fprintln(writer, "ID\tGl\tName") for _, i18nRegion := range i18nRegions { _, _ = fmt.Fprintf( - writer, "%v\t%v\t%v\n", + writer, "%s\t%s\t%s\n", i18nRegion.Id, i18nRegion.Snippet.Gl, i18nRegion.Snippet.Name, ) } diff --git a/pkg/member/member.go b/pkg/member/member.go index 448ed08..375de41 100644 --- a/pkg/member/member.go +++ b/pkg/member/member.go @@ -74,7 +74,7 @@ func (m *member) List(parts []string, output string, writer io.Writer) error { case "yaml": utils.PrintYAML(members, writer) default: - _, _ = fmt.Fprintln(writer, "channelId\tdisplayName") + _, _ = fmt.Fprintln(writer, "ChannelId\tDisplayName") for _, member := range members { _, _ = fmt.Fprintf( writer, "%s\t%s\n", diff --git a/pkg/membershipsLevel/membershipsLevel.go b/pkg/membershipsLevel/membershipsLevel.go index 7ad983d..8dbcc99 100644 --- a/pkg/membershipsLevel/membershipsLevel.go +++ b/pkg/membershipsLevel/membershipsLevel.go @@ -59,7 +59,7 @@ func (m *membershipsLevel) List( case "yaml": utils.PrintYAML(membershipsLevels, writer) default: - _, _ = fmt.Fprintln(writer, "id\tdisplayName") + _, _ = fmt.Fprintln(writer, "ID\tDisplayName") for _, membershipsLevel := range membershipsLevels { _, _ = fmt.Fprintf( writer, "%v\t%v\n", membershipsLevel.Id, diff --git a/pkg/playlistImage/playlistImage.go b/pkg/playlistImage/playlistImage.go index bc7a68f..ccf1ec9 100644 --- a/pkg/playlistImage/playlistImage.go +++ b/pkg/playlistImage/playlistImage.go @@ -91,7 +91,7 @@ func (pi *playlistImage) List( case "yaml": utils.PrintYAML(playlistImages, writer) default: - _, _ = fmt.Fprintln(writer, "ID\tKind\tPlaylistID\tType") + _, _ = fmt.Fprintln(writer, "ID\tKind\tPlaylistId\tType") for _, image := range playlistImages { _, _ = fmt.Fprintf( writer, diff --git a/pkg/search/search.go b/pkg/search/search.go index 54f3edb..9174f5b 100644 --- a/pkg/search/search.go +++ b/pkg/search/search.go @@ -205,7 +205,7 @@ func (s *search) List(parts []string, output string, writer io.Writer) error { _, _ = fmt.Fprintln(writer, "Kind\tTitle") for _, result := range results { _, _ = fmt.Fprintf( - writer, "%v\t%v\n", result.Id.Kind, result.Snippet.Title, + writer, "%s\t%s\n", result.Id.Kind, result.Snippet.Title, ) } } diff --git a/pkg/subscription/subscription.go b/pkg/subscription/subscription.go index 63b97f0..36d58fa 100644 --- a/pkg/subscription/subscription.go +++ b/pkg/subscription/subscription.go @@ -109,7 +109,7 @@ func (s *subscription) List( case "yaml": utils.PrintYAML(subscriptions, writer) default: - _, _ = fmt.Fprintln(writer, "ID\tChannel ID\tChannel Title") + _, _ = fmt.Fprintln(writer, "ID\tChannelId\tChannelTitle") for _, subscription := range subscriptions { _, _ = fmt.Fprintf( writer, "%s\t%s\t%s\n", subscription.Id, diff --git a/pkg/superChatEvent/superChatEvent.go b/pkg/superChatEvent/superChatEvent.go index a8b7678..718d10d 100644 --- a/pkg/superChatEvent/superChatEvent.go +++ b/pkg/superChatEvent/superChatEvent.go @@ -71,7 +71,7 @@ func (s *superChatEvent) List( _, _ = fmt.Fprintln(writer, "ID\tAmount") for _, event := range events { _, _ = fmt.Fprintf( - writer, "%v\t%v\n", event.Id, event.Snippet.AmountMicros, + writer, "%s\t%d\n", event.Id, event.Snippet.AmountMicros, ) } }