From 5ba7e21a7219c19524acbfb9a1aa28c27302ac1e Mon Sep 17 00:00:00 2001 From: Tom Gundersen Date: Sun, 10 May 2020 21:56:13 +0200 Subject: [PATCH] store/compose: rename 'Id' to 'ID' to make linter happy Signed-off-by: Tom Gundersen --- internal/store/compose.go | 8 ++++---- internal/store/json.go | 8 ++++---- internal/store/store.go | 2 +- internal/weldr/api.go | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/internal/store/compose.go b/internal/store/compose.go index 3b26214cd..d69e52bdf 100644 --- a/internal/store/compose.go +++ b/internal/store/compose.go @@ -20,7 +20,7 @@ func (ste *StateTransitionError) Error() string { // ImageBuild represents a single image build inside a compose type ImageBuild struct { - Id int + ID int ImageType common.ImageType Manifest *osbuild.Manifest Targets []*target.Target @@ -28,7 +28,7 @@ type ImageBuild struct { JobStarted time.Time JobFinished time.Time Size uint64 - JobId uuid.UUID + JobID uuid.UUID // Kept for backwards compatibility. Image builds which were done // before the move to the job queue use this to store whether they // finished successfully. @@ -49,7 +49,7 @@ func (ib *ImageBuild) DeepCopy() ImageBuild { } // Create new image build struct return ImageBuild{ - Id: ib.Id, + ID: ib.ID, QueueStatus: ib.QueueStatus, ImageType: ib.ImageType, Manifest: newManifestPtr, @@ -58,7 +58,7 @@ func (ib *ImageBuild) DeepCopy() ImageBuild { JobStarted: ib.JobStarted, JobFinished: ib.JobFinished, Size: ib.Size, - JobId: ib.JobId, + JobID: ib.JobID, } } diff --git a/internal/store/json.go b/internal/store/json.go index 01d64008a..0a580e615 100644 --- a/internal/store/json.go +++ b/internal/store/json.go @@ -102,7 +102,7 @@ func newComposesFromV0(composesStruct composesV0) map[uuid.UUID]Compose { } for _, imgBuild := range composeStruct.ImageBuilds { ib := ImageBuild{ - Id: imgBuild.ID, + ID: imgBuild.ID, ImageType: imgBuild.ImageType, Manifest: imgBuild.Manifest, Targets: imgBuild.Targets, @@ -110,7 +110,7 @@ func newComposesFromV0(composesStruct composesV0) map[uuid.UUID]Compose { JobStarted: imgBuild.JobStarted, JobFinished: imgBuild.JobFinished, Size: imgBuild.Size, - JobId: imgBuild.JobID, + JobID: imgBuild.JobID, QueueStatus: imgBuild.QueueStatus, } c.ImageBuilds = append(c.ImageBuilds, ib) @@ -239,7 +239,7 @@ func newComposesV0(composes map[uuid.UUID]Compose) composesV0 { } for _, imgBuild := range compose.ImageBuilds { ib := imageBuildV0{ - ID: imgBuild.Id, + ID: imgBuild.ID, ImageType: imgBuild.ImageType, Manifest: imgBuild.Manifest, Targets: imgBuild.Targets, @@ -247,7 +247,7 @@ func newComposesV0(composes map[uuid.UUID]Compose) composesV0 { JobStarted: imgBuild.JobStarted, JobFinished: imgBuild.JobFinished, Size: imgBuild.Size, - JobID: imgBuild.JobId, + JobID: imgBuild.JobID, QueueStatus: imgBuild.QueueStatus, } c.ImageBuilds = append(c.ImageBuilds, ib) diff --git a/internal/store/store.go b/internal/store/store.go index 131e93217..99e9d5c53 100644 --- a/internal/store/store.go +++ b/internal/store/store.go @@ -423,7 +423,7 @@ func (s *Store) PushCompose(composeID uuid.UUID, manifest *osbuild.Manifest, ima Targets: targets, JobCreated: time.Now(), Size: size, - JobId: jobId, + JobID: jobId, }, }, } diff --git a/internal/weldr/api.go b/internal/weldr/api.go index 5922112e3..46153b69b 100644 --- a/internal/weldr/api.go +++ b/internal/weldr/api.go @@ -150,7 +150,7 @@ func (api *API) getComposeState(compose store.Compose) (state common.ComposeStat return } - jobId := compose.ImageBuilds[0].JobId + jobId := compose.ImageBuilds[0].JobID // backwards compatibility: composes that were around before splitting // the job queue from the store still contain their valid status and