Skip to content

Commit

Permalink
don't prefix numbers with 0 - otherwise they're octal
Browse files Browse the repository at this point in the history
  • Loading branch information
dprotaso committed Jun 21, 2024
1 parent af5b91c commit 9504615
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions apis/condition_types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ func TestJSON(t *testing.T) {
name: "LastTransitionTime",
raw: `{"lastTransitionTime":"1984-02-28T18:52:00Z"}`,
condition: &Condition{
LastTransitionTime: VolatileTime{Inner: metav1.NewTime(time.Date(1984, 0o2, 28, 18, 52, 0o0, 0o0, time.UTC))},
LastTransitionTime: VolatileTime{Inner: metav1.NewTime(time.Date(1984, 2, 28, 18, 52, 0, 0, time.UTC))},
},
}, {
name: "Reason",
Expand All @@ -263,7 +263,7 @@ func TestJSON(t *testing.T) {
condition: &Condition{
Type: "Foo",
Status: corev1.ConditionTrue,
LastTransitionTime: VolatileTime{Inner: metav1.NewTime(time.Date(1984, 0o2, 28, 18, 52, 0o0, 0o0, time.UTC))},
LastTransitionTime: VolatileTime{Inner: metav1.NewTime(time.Date(1984, 2, 28, 18, 52, 0, 0, time.UTC))},
Reason: "DatTest",
Message: "this is just a test",
},
Expand Down
2 changes: 1 addition & 1 deletion apis/duck/v1/kresource_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func (t *KResource) Populate() {
// Populate ALL fields
Type: "Birthday",
Status: corev1.ConditionTrue,
LastTransitionTime: apis.VolatileTime{Inner: metav1.NewTime(time.Date(1984, 0o2, 28, 18, 52, 0o0, 0o0, time.UTC))},
LastTransitionTime: apis.VolatileTime{Inner: metav1.NewTime(time.Date(1984, 2, 28, 18, 52, 0, 0, time.UTC))},
Reason: "Celebrate",
Message: "n3wScott, find your party hat :tada:",
}}
Expand Down
2 changes: 1 addition & 1 deletion apis/duck/v1/source_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ func (s *Source) Populate() {
// Populate ALL fields
Type: SourceConditionSinkProvided,
Status: corev1.ConditionTrue,
LastTransitionTime: apis.VolatileTime{Inner: metav1.NewTime(time.Date(1984, 0o2, 28, 18, 52, 0o0, 0o0, time.UTC))},
LastTransitionTime: apis.VolatileTime{Inner: metav1.NewTime(time.Date(1984, 2, 28, 18, 52, 0, 0, time.UTC))},
}}
s.Status.SinkURI = &apis.URL{
Scheme: "https",
Expand Down
2 changes: 1 addition & 1 deletion apis/duck/v1beta1/source_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ func (s *Source) Populate() {
// Populate ALL fields
Type: SourceConditionSinkProvided,
Status: corev1.ConditionTrue,
LastTransitionTime: apis.VolatileTime{Inner: metav1.NewTime(time.Date(1984, 0o2, 28, 18, 52, 0o0, 0o0, time.UTC))},
LastTransitionTime: apis.VolatileTime{Inner: metav1.NewTime(time.Date(1984, 2, 28, 18, 52, 0, 0, time.UTC))},
}}
s.Status.SinkURI = &apis.URL{
Scheme: "https",
Expand Down
2 changes: 1 addition & 1 deletion apis/duck/v1beta1/status_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ func (t *KResource) Populate() {
// Populate ALL fields
Type: "Birthday",
Status: corev1.ConditionTrue,
LastTransitionTime: apis.VolatileTime{Inner: metav1.NewTime(time.Date(1984, 0o2, 28, 18, 52, 0o0, 0o0, time.UTC))},
LastTransitionTime: apis.VolatileTime{Inner: metav1.NewTime(time.Date(1984, 2, 28, 18, 52, 0, 0, time.UTC))},
Reason: "Celebrate",
Message: "n3wScott, find your party hat :tada:",
}}
Expand Down

0 comments on commit 9504615

Please sign in to comment.