Skip to content

Commit ad22b2a

Browse files
committed
💬 Align output format
1 parent 575e4a9 commit ad22b2a

File tree

12 files changed

+17
-17
lines changed

12 files changed

+17
-17
lines changed

pkg/auth/auth.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ func startWebServer(redirectURL string) chan string {
126126
_ = listener.Close()
127127
w.Header().Set("Content-Type", "text/plain")
128128
_, _ = fmt.Fprintf(
129-
w, "Received code: %v\r\nYou can now safely close this window.", code,
129+
w, "Received code: %s\r\nYou can now safely close this window.", code,
130130
)
131131
},
132132
),
@@ -138,7 +138,7 @@ func startWebServer(redirectURL string) chan string {
138138
func getCodeFromPrompt(authURL string) (code string) {
139139
fmt.Printf(
140140
"It seems that your browser is not open. Go to the following "+
141-
"link in your browser:\n%v\n", authURL,
141+
"link in your browser:\n%s\n", authURL,
142142
)
143143
fmt.Print(manualInputHint)
144144
_, err := fmt.Scan(&code)
@@ -159,7 +159,7 @@ func getTokenFromWeb(config *oauth2.Config, authURL string) *oauth2.Token {
159159
if err := utils.OpenURL(authURL); err == nil {
160160
fmt.Printf(
161161
"Your browser has been opened to an authorization URL. This "+
162-
"program will resume once authorization has been provided.\n%v\n",
162+
"program will resume once authorization has been provided.\n%s\n",
163163
authURL,
164164
)
165165
code = <-codeCh
@@ -169,7 +169,7 @@ func getTokenFromWeb(config *oauth2.Config, authURL string) *oauth2.Token {
169169
code = getCodeFromPrompt(authURL)
170170
}
171171

172-
fmt.Printf("Authorization code generated: %v\n", code)
172+
fmt.Printf("Authorization code generated: %s\n", code)
173173
token, err := config.Exchange(context.TODO(), code)
174174
if err != nil {
175175
log.Fatalln(errors.Join(errExchange, err))

pkg/auth/service.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const missingClientSecretsHint string = `
2525
Please configure OAuth 2.0
2626
To make this sample run, you need to populate the client_secrets.json file
2727
found at:
28-
%v
28+
%s
2929
with information from the {{ Google Cloud Console }}
3030
{{ https://cloud.google.com/console }}
3131
For more information about the client_secrets.json file format, please visit:

pkg/channelSection/channelSection.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ func (cs *channelSection) List(
8383
case "yaml":
8484
utils.PrintYAML(channelSections, writer)
8585
default:
86-
_, _ = fmt.Fprintln(writer, "ID\tChannelID\tTitle")
86+
_, _ = fmt.Fprintln(writer, "ID\tChannelId\tTitle")
8787
for _, channelSection := range channelSections {
8888
_, _ = fmt.Fprintf(
8989
writer, "%s\t%s\t%s\n", channelSection.Id,

pkg/commentThread/commentThread.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ func (c *commentThread) List(
109109
case "yaml":
110110
utils.PrintYAML(commentThreads, writer)
111111
default:
112-
_, _ = fmt.Fprintln(writer, "ID\tTopLevelCommentID")
112+
_, _ = fmt.Fprintln(writer, "ID\tTopLevelCommentId")
113113
for _, commentThread := range commentThreads {
114114
_, _ = fmt.Fprintf(
115115
writer, "%s\t%s\n",

pkg/i18nLanguage/i18nLanguage.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,10 @@ func (i *i18nLanguage) List(
6363
case "yaml":
6464
utils.PrintYAML(i18nLanguages, writer)
6565
default:
66-
_, _ = fmt.Fprintln(writer, "id\thl\tname")
66+
_, _ = fmt.Fprintln(writer, "ID\tHl\tName")
6767
for _, i18nLanguage := range i18nLanguages {
6868
_, _ = fmt.Fprintf(
69-
writer, "%v\t%v\t%v\n",
69+
writer, "%s\t%s\t%s\n",
7070
i18nLanguage.Id, i18nLanguage.Snippet.Hl, i18nLanguage.Snippet.Name,
7171
)
7272
}

pkg/i18nRegion/i18nRegion.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,10 @@ func (i *i18nRegion) List(
6363
case "yaml":
6464
utils.PrintYAML(i18nRegions, writer)
6565
default:
66-
_, _ = fmt.Fprintln(writer, "ID\tgl\tname")
66+
_, _ = fmt.Fprintln(writer, "ID\tGl\tName")
6767
for _, i18nRegion := range i18nRegions {
6868
_, _ = fmt.Fprintf(
69-
writer, "%v\t%v\t%v\n",
69+
writer, "%s\t%s\t%s\n",
7070
i18nRegion.Id, i18nRegion.Snippet.Gl, i18nRegion.Snippet.Name,
7171
)
7272
}

pkg/member/member.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ func (m *member) List(parts []string, output string, writer io.Writer) error {
7474
case "yaml":
7575
utils.PrintYAML(members, writer)
7676
default:
77-
_, _ = fmt.Fprintln(writer, "channelId\tdisplayName")
77+
_, _ = fmt.Fprintln(writer, "ChannelId\tDisplayName")
7878
for _, member := range members {
7979
_, _ = fmt.Fprintf(
8080
writer, "%s\t%s\n",

pkg/membershipsLevel/membershipsLevel.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func (m *membershipsLevel) List(
5959
case "yaml":
6060
utils.PrintYAML(membershipsLevels, writer)
6161
default:
62-
_, _ = fmt.Fprintln(writer, "id\tdisplayName")
62+
_, _ = fmt.Fprintln(writer, "ID\tDisplayName")
6363
for _, membershipsLevel := range membershipsLevels {
6464
_, _ = fmt.Fprintf(
6565
writer, "%v\t%v\n", membershipsLevel.Id,

pkg/playlistImage/playlistImage.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ func (pi *playlistImage) List(
9191
case "yaml":
9292
utils.PrintYAML(playlistImages, writer)
9393
default:
94-
_, _ = fmt.Fprintln(writer, "ID\tKind\tPlaylistID\tType")
94+
_, _ = fmt.Fprintln(writer, "ID\tKind\tPlaylistId\tType")
9595
for _, image := range playlistImages {
9696
_, _ = fmt.Fprintf(
9797
writer,

pkg/search/search.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ func (s *search) List(parts []string, output string, writer io.Writer) error {
205205
_, _ = fmt.Fprintln(writer, "Kind\tTitle")
206206
for _, result := range results {
207207
_, _ = fmt.Fprintf(
208-
writer, "%v\t%v\n", result.Id.Kind, result.Snippet.Title,
208+
writer, "%s\t%s\n", result.Id.Kind, result.Snippet.Title,
209209
)
210210
}
211211
}

0 commit comments

Comments
 (0)