Skip to content

Commit d6b835f

Browse files
committed
style(rollouts): gofmt analysisruns.go and correct the trigger label values
The comments interleaved in AnalysisRunSummary split gofmt's struct tag alignment into separate blocks, so the original spacing no longer matched what gofmt produces. CI's gofmt check fails on it. The rollout-type label values in the comment were also wrong. Argo Rollouts writes Step, Background, PrePromotion and PostPromotion, not the longer "...Analysis" spellings.
1 parent add1678 commit d6b835f

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

‎pkg/rollouts/analysisruns.go‎

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,12 @@ var analysisRunGVR = schema.GroupVersionResource{
2424
// deliberately restricted to those for graphing; this listing has no such
2525
// bound since it's a plain history view, not a graph that must stay small).
2626
type AnalysisRunSummary struct {
27-
Name string `json:"name"`
28-
Phase string `json:"phase"`
29-
Message string `json:"message,omitempty"`
27+
Name string `json:"name"`
28+
Phase string `json:"phase"`
29+
Message string `json:"message,omitempty"`
3030
// Trigger comes from the "rollout-type" label Argo Rollouts sets on every
31-
// run it creates: Step / BackgroundAnalysis / PrePromotionAnalysis /
32-
// PostPromotionAnalysis.
33-
Trigger string `json:"trigger,omitempty"`
31+
// run it creates: Step / Background / PrePromotion / PostPromotion.
32+
Trigger string `json:"trigger,omitempty"`
3433
// StepIndex is only set for a Step-triggered run (the "step-index" label).
3534
StepIndex *int64 `json:"stepIndex,omitempty"`
3635
CreatedAt time.Time `json:"createdAt"`

0 commit comments

Comments
 (0)