Skip to content

Commit d1b153c

Browse files
committed
Yaml to YAML
1 parent 5566289 commit d1b153c

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

pkg/cmd/workflow/view/view.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ type ViewOptions struct {
3030
Web bool
3131
Prompt bool
3232
Raw bool
33-
Yaml bool
33+
YAML bool
3434
}
3535

3636
func NewCmdView(f *cmdutil.Factory, runF func(*ViewOptions) error) *cobra.Command {
@@ -74,7 +74,7 @@ func NewCmdView(f *cmdutil.Factory, runF func(*ViewOptions) error) *cobra.Comman
7474
}
7575

7676
cmd.Flags().BoolVarP(&opts.Web, "web", "w", false, "Open workflow in the browser")
77-
cmd.Flags().BoolVarP(&opts.Yaml, "yaml", "y", false, "View the workflow yaml file")
77+
cmd.Flags().BoolVarP(&opts.YAML, "yaml", "y", false, "View the workflow yaml file")
7878
cmd.Flags().StringVarP(&opts.Ref, "ref", "r", "", "The branch or tag name which contains the version of the workflow file you'd like to view")
7979

8080
return cmd
@@ -102,7 +102,7 @@ func runView(opts *ViewOptions) error {
102102
if opts.Web {
103103
var url string
104104
hostname := repo.RepoHost()
105-
if opts.Yaml {
105+
if opts.YAML {
106106
ref := opts.Ref
107107
if ref == "" {
108108
opts.IO.StartProgressIndicator()
@@ -123,7 +123,7 @@ func runView(opts *ViewOptions) error {
123123
return opts.Browser.Browse(url)
124124
}
125125

126-
if opts.Yaml {
126+
if opts.YAML {
127127
err = viewWorkflowContent(opts, client, workflow)
128128
} else {
129129
err = viewWorkflowInfo(opts, client, workflow)

pkg/cmd/workflow/view/view_test.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,15 @@ func TestNewCmdView(t *testing.T) {
7777
tty: true,
7878
wants: ViewOptions{
7979
Prompt: true,
80-
Yaml: true,
80+
YAML: true,
8181
},
8282
},
8383
{
8484
name: "yaml nontty",
8585
cli: "-y 123",
8686
wants: ViewOptions{
8787
Raw: true,
88-
Yaml: true,
88+
YAML: true,
8989
Selector: "123",
9090
},
9191
},
@@ -144,7 +144,7 @@ func TestNewCmdView(t *testing.T) {
144144
assert.Equal(t, tt.wants.Web, gotOpts.Web)
145145
assert.Equal(t, tt.wants.Prompt, gotOpts.Prompt)
146146
assert.Equal(t, tt.wants.Raw, gotOpts.Raw)
147-
assert.Equal(t, tt.wants.Yaml, gotOpts.Yaml)
147+
assert.Equal(t, tt.wants.YAML, gotOpts.YAML)
148148
})
149149
}
150150
}
@@ -231,7 +231,7 @@ func TestViewRun(t *testing.T) {
231231
tty: true,
232232
opts: &ViewOptions{
233233
Selector: "123",
234-
Yaml: true,
234+
YAML: true,
235235
Web: true,
236236
},
237237
httpStubs: func(reg *httpmock.Registry) {
@@ -252,7 +252,7 @@ func TestViewRun(t *testing.T) {
252252
opts: &ViewOptions{
253253
Selector: "123",
254254
Ref: "base",
255-
Yaml: true,
255+
YAML: true,
256256
Web: true,
257257
},
258258
httpStubs: func(reg *httpmock.Registry) {
@@ -268,7 +268,7 @@ func TestViewRun(t *testing.T) {
268268
tty: true,
269269
opts: &ViewOptions{
270270
Selector: "123",
271-
Yaml: true,
271+
YAML: true,
272272
},
273273
httpStubs: func(reg *httpmock.Registry) {
274274
reg.Register(
@@ -287,7 +287,7 @@ func TestViewRun(t *testing.T) {
287287
tty: false,
288288
opts: &ViewOptions{
289289
Selector: "123",
290-
Yaml: true,
290+
YAML: true,
291291
},
292292
httpStubs: func(reg *httpmock.Registry) {
293293
reg.Register(
@@ -306,7 +306,7 @@ func TestViewRun(t *testing.T) {
306306
tty: true,
307307
opts: &ViewOptions{
308308
Selector: "123",
309-
Yaml: true,
309+
YAML: true,
310310
},
311311
httpStubs: func(reg *httpmock.Registry) {
312312
reg.Register(
@@ -327,7 +327,7 @@ func TestViewRun(t *testing.T) {
327327
opts: &ViewOptions{
328328
Selector: "123",
329329
Ref: "456",
330-
Yaml: true,
330+
YAML: true,
331331
},
332332
httpStubs: func(reg *httpmock.Registry) {
333333
reg.Register(

0 commit comments

Comments
 (0)