diff --git a/pkg/compose/pull.go b/pkg/compose/pull.go index f1b6a64a12..ce14a5b5ce 100644 --- a/pkg/compose/pull.go +++ b/pkg/compose/pull.go @@ -214,7 +214,7 @@ func (s *composeService) pullServiceImage(ctx context.Context, service types.Ser return "", nil } - // check if has error and the service has a build section + // check if it has an error and the service has a build section // then the status should be warning instead of error if err != nil && service.Build != nil { s.events.On(api.Resource{ diff --git a/pkg/compose/run.go b/pkg/compose/run.go index 7ca080264d..5735d5247d 100644 --- a/pkg/compose/run.go +++ b/pkg/compose/run.go @@ -47,7 +47,7 @@ func (s *composeService) RunOneOffContainer(ctx context.Context, project *types. return 0, err } - // remove cancellable context signal handler so we can forward signals to container without compose from exiting + // remove cancellable context signal handler so we can forward signals to container without compose exiting signal.Reset() sigc := make(chan os.Signal, 128) diff --git a/pkg/compose/watch.go b/pkg/compose/watch.go index f63c51683a..0af3650ede 100644 --- a/pkg/compose/watch.go +++ b/pkg/compose/watch.go @@ -247,7 +247,7 @@ func (s *composeService) watch(ctx context.Context, project *types.Project, opti } if shouldInitialSync && isSync(trigger) { - // Need to check initial files are in container that are meant to be synced from watch action + // Need to check that initial files meant to be synced from the watch action are in the container err := s.initialSync(ctx, project, service, trigger, syncer) if err != nil { return nil, err @@ -761,7 +761,7 @@ func (s *composeService) initialSync(ctx context.Context, project *types.Project return syncer.Sync(ctx, service.Name, pathsToCopy) } -// Syncs files from develop.watch.path if thy have been modified after the image has been created +// Syncs files from develop.watch.path if they have been modified after the image has been created // //nolint:gocyclo func (s *composeService) initialSyncFiles(ctx context.Context, project *types.Project, service types.ServiceConfig, trigger types.Trigger, ignore watch.PathMatcher) ([]*sync.PathMapping, error) { diff --git a/pkg/remote/oci.go b/pkg/remote/oci.go index 58d1a61589..7b663d770a 100644 --- a/pkg/remote/oci.go +++ b/pkg/remote/oci.go @@ -45,7 +45,7 @@ const ( ) // validatePathInBase ensures a file path is contained within the base directory, -// as OCI artifacts resources must all live within the same folder. +// as OCI artifact resources must all live within the same folder. func validatePathInBase(base, unsafePath string) error { // Reject paths with path separators regardless of OS if strings.ContainsAny(unsafePath, "\\/") { @@ -149,7 +149,7 @@ func (g *ociRemoteLoader) Load(ctx context.Context, path string) (string, error) local = filepath.Join(cache, descriptor.Digest.Hex()) if _, err = os.Stat(local); os.IsNotExist(err) { - // a Compose application bundle is published as image index + // a Compose application bundle is published as an image index if images.IsIndexType(descriptor.MediaType) { var index spec.Index err = json.Unmarshal(content, &index) @@ -184,7 +184,7 @@ func (g *ociRemoteLoader) Load(ctx context.Context, path string) (string, error) err = g.pullComposeFiles(ctx, local, manifest, ref, resolver) if err != nil { - // we need to clean up the directory to be sure we won't let empty files present + // we need to clean up the directory to be sure we won't leave empty files behind _ = os.RemoveAll(local) return "", err }