Skip to content

Commit

Permalink
Rename struct to avoid stutter in naming
Browse files Browse the repository at this point in the history
  • Loading branch information
ycombinator committed Oct 17, 2023
1 parent 1f19406 commit ce9d704
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions internal/pkg/agent/application/upgrade/details/details.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ type Details struct {
TargetVersion string
State State
ActionID string
Metadata DetailsMetadata
Metadata Metadata

observers []Observer
mu sync.Mutex
}

// DetailsMetadata consists of metadata relating to a specific upgrade state
type DetailsMetadata struct {
// Metadata consists of metadata relating to a specific upgrade state
type Metadata struct {
ScheduledAt time.Time
DownloadPercent float64
DownloadRate float64
Expand All @@ -45,7 +45,7 @@ func NewDetails(targetVersion string, initialState State, actionID string) *Deta
TargetVersion: targetVersion,
State: initialState,
ActionID: actionID,
Metadata: DetailsMetadata{},
Metadata: Metadata{},
observers: []Observer{},
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func TestDetailsNew(t *testing.T) {
require.Equal(t, StateRequested, det.State)
require.Equal(t, "99.999.9999", det.TargetVersion)
require.Equal(t, "test_action_id", det.ActionID)
require.Equal(t, DetailsMetadata{}, det.Metadata)
require.Equal(t, Metadata{}, det.Metadata)
}

func TestDetailsSetState(t *testing.T) {
Expand Down

0 comments on commit ce9d704

Please sign in to comment.