File tree Expand file tree Collapse file tree 3 files changed +10
-8
lines changed Expand file tree Collapse file tree 3 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -675,7 +675,8 @@ func (k kops) BuildTester(o *e2e.BuildTesterOptions) (e2e.Tester, error) {
675675 t .KubeMasterURL = kubecfg .Clusters [0 ].Cluster .Server
676676 }
677677
678- if k .provider == "gce" {
678+ switch k .provider {
679+ case "gce" :
679680 t .GCEProject = k .gcpProject
680681 if len (k .zones ) > 0 {
681682 zone := k .zones [0 ]
@@ -688,7 +689,7 @@ func (k kops) BuildTester(o *e2e.BuildTesterOptions) (e2e.Tester, error) {
688689 }
689690 t .GCERegion = zone [0 :lastDash ]
690691 }
691- } else if k . provider == "aws" {
692+ case "aws" :
692693 if len (k .zones ) > 0 {
693694 zone := k .zones [0 ]
694695 // These GCE fields are actually provider-agnostic
Original file line number Diff line number Diff line change @@ -765,16 +765,16 @@ func main() {
765765 logrus .Fatalf ("--only and --orgs cannot both be set" )
766766 }
767767
768- switch {
769- case o . action == "docs" :
768+ switch o . action {
769+ case "docs" :
770770 if err := writeDocs (o .docsTemplate , o .docsOutput , * config ); err != nil {
771771 logrus .WithError (err ).Fatalf ("failed to write docs using docs-template %s to docs-output %s" , o .docsTemplate , o .docsOutput )
772772 }
773- case o . action == "css" :
773+ case "css" :
774774 if err := writeCSS (o .cssTemplate , o .cssOutput , * config ); err != nil {
775775 logrus .WithError (err ).Fatalf ("failed to write css file using css-template %s to css-output %s" , o .cssTemplate , o .cssOutput )
776776 }
777- case o . action == "sync" :
777+ case "sync" :
778778 var githubClient client
779779 var err error
780780 if deprecated {
Original file line number Diff line number Diff line change @@ -163,15 +163,16 @@ func parse(raw []byte) (*junit.Suites, error) {
163163 case reActionLine .MatchString (line ):
164164 match := reActionLine .FindStringSubmatch (line )
165165 emptyText := "" // Will be replaced with real text once output is read.
166- if match [1 ] == "SKIP" {
166+ switch match [1 ] {
167+ case "SKIP" :
167168 suite .Results = append (suite .Results , junit.Result {
168169 ClassName : path .Base (suite .Name ),
169170 Name : match [2 ],
170171 Skipped : & junit.Skipped {
171172 Value : emptyText ,
172173 },
173174 })
174- } else if match [ 1 ] == "FAIL" {
175+ case "FAIL" :
175176 suite .Results = append (suite .Results , junit.Result {
176177 ClassName : path .Base (suite .Name ),
177178 Name : match [2 ],
You can’t perform that action at this time.
0 commit comments