Skip to content

Commit

Permalink
chore: fix lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
moshloop committed Dec 1, 2024
1 parent 2b39393 commit 5822f60
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions pkg/health/health.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ func max(a, b time.Time) time.Time {
}

func GetLastUpdatedTime(obj *unstructured.Unstructured) *time.Time {

lastUpdated := obj.GetCreationTimestamp().Time

// Check annotations
Expand Down Expand Up @@ -275,7 +274,10 @@ func GetResourceHealth(
Status: "TerminatingStalled",
LastUpdated: GetLastUpdatedTime(obj),
Health: HealthWarning,
Message: fmt.Sprintf("terminating for %v", duration.ShortHumanDuration(terminatingFor.Truncate(time.Hour))),
Message: fmt.Sprintf(
"terminating for %v",
duration.ShortHumanDuration(terminatingFor.Truncate(time.Hour)),
),
}, nil
}

Expand Down
4 changes: 2 additions & 2 deletions pkg/health/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ type HealthStatus struct {
Ready bool `json:"ready"`
Health Health `json:"health"`
// Status holds the status code of the application or resource
Status HealthStatusCode `json:"status,omitempty" protobuf:"bytes,1,opt,name=status"`
Status HealthStatusCode `json:"status,omitempty" protobuf:"bytes,1,opt,name=status"`
// Message is a human-readable informational message describing the health status
Message string `json:"message,omitempty" protobuf:"bytes,2,opt,name=message"`
Message string `json:"message,omitempty" protobuf:"bytes,2,opt,name=message"`
// LastUpdated is the time this resource as last updated, detected by inspecting all
// of the relevant status timestamps
LastUpdated *time.Time `json:"lastUpdated,omitempty"`
Expand Down

0 comments on commit 5822f60

Please sign in to comment.