Skip to content

controller: function to sort objects by timestamp #4

controller: function to sort objects by timestamp

controller: function to sort objects by timestamp #4

Triggered via pull request October 1, 2024 10:29
Status Failure
Total duration 38s
Artifacts

code-style.yaml

on: pull_request
Matrix: Auto-format and Check
Fit to window
Zoom out
Zoom in

Annotations

2 errors and 8 warnings
Auto-format and Check (gofmt): controller/object_test.go#L1
Please run gofmt -s. diff --git a/controller/object_test.go b/controller/object_test.go index 9309db0..2975e36 100644 --- a/controller/object_test.go +++ b/controller/object_test.go @@ -12,9 +12,9 @@ import ( func TestObjectsByCreationTimestamp(t *testing.T) { pods := []*corev1.Pod{ - &corev1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "pod1", CreationTimestamp: metav1.Time{Time: time.Unix(1, 0)}}}, - &corev1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "pod2", CreationTimestamp: metav1.Time{Time: time.Unix(2, 0)}}}, - &corev1.Pod{ObjectMeta: metav1.ObjectMeta{Name: "pod3", CreationTimestamp: metav1.Time{Time: time.Unix(1, 0)}}}, + {ObjectMeta: metav1.ObjectMeta{Name: "pod1", CreationTimestamp: metav1.Time{Time: time.Unix(1, 0)}}}, + {ObjectMeta: metav1.ObjectMeta{Name: "pod2", CreationTimestamp: metav1.Time{Time: time.Unix(2, 0)}}}, + {ObjectMeta: metav1.ObjectMeta{Name: "pod3", CreationTimestamp: metav1.Time{Time: time.Unix(1, 0)}}}, } objs := lo.Map(pods, func(pod *corev1.Pod, _ int) Object { return pod }) sort.Sort(ObjectsByCreationTimestamp(objs))
Auto-format and Check (gofmt)
Process completed with exit code 1.
Auto-format and Check (gofmt)
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/setup-go@v4, actions/checkout@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
Auto-format and Check (gofmt)
Restore cache failed: Dependencies file is not found in /home/runner/work/policy-machinery/policy-machinery. Supported file pattern: go.sum
Auto-format and Check (goimports)
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/setup-go@v4, actions/checkout@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
Auto-format and Check (goimports)
Restore cache failed: Dependencies file is not found in /home/runner/work/policy-machinery/policy-machinery. Supported file pattern: go.sum
Lint
The following actions uses node12 which is deprecated and will be forced to run on node16: andstor/file-existence-action@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
Lint
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/setup-go@v4, actions/checkout@v3, andstor/file-existence-action@v1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
Lint
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Lint
Restore cache failed: Dependencies file is not found in /home/runner/work/policy-machinery/policy-machinery. Supported file pattern: go.sum