Make status times nullable.

pull/2160/head
tamal 9 years ago
parent 87af549098
commit f6bfbfe51b

@ -43,10 +43,10 @@ type ReleaseStatus struct {
Resources string `json:"resources,omitempty"`
// Contains the rendered templates/NOTES.txt if available
Notes string `json:"notes,omitempty"`
FirstDeployed unversioned.Time `json:"first_deployed,omitempty"`
LastDeployed unversioned.Time `json:"last_deployed,omitempty"`
FirstDeployed *unversioned.Time `json:"first_deployed,omitempty"`
LastDeployed *unversioned.Time `json:"last_deployed,omitempty"`
// Deleted tracks when this object was deleted.
Deleted unversioned.Time `json:"deleted,omitempty"`
Deleted *unversioned.Time `json:"deleted,omitempty"`
}
type ReleaseList struct {

@ -419,10 +419,10 @@ func newReleasesObject(key string, rls *rspb.Release, lbs labels) (*rapi.Release
return r, nil
}
func toKubeTime(pbt *google_protobuf.Timestamp) unversioned.Time {
var t unversioned.Time
func toKubeTime(pbt *google_protobuf.Timestamp) *unversioned.Time {
if pbt != nil {
t = unversioned.NewTime(time.Unix(pbt.Seconds, int64(pbt.Nanos)))
t := unversioned.NewTime(time.Unix(pbt.Seconds, int64(pbt.Nanos)))
return &t
}
return t
return nil
}

Loading…
Cancel
Save