Skip to content

Commit be0c713

Browse files
solunolabglours
authored andcommitted
chore: fix some comments to improve readability
Signed-off-by: solunolab <solunolab@outlook.com>
1 parent a4ec1dc commit be0c713

4 files changed

Lines changed: 7 additions & 7 deletions

File tree

pkg/compose/pull.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ func (s *composeService) pullServiceImage(ctx context.Context, service types.Ser
214214
return "", nil
215215
}
216216

217-
// check if has error and the service has a build section
217+
// check if it has an error and the service has a build section
218218
// then the status should be warning instead of error
219219
if err != nil && service.Build != nil {
220220
s.events.On(api.Resource{

pkg/compose/run.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ func (s *composeService) RunOneOffContainer(ctx context.Context, project *types.
4747
return 0, err
4848
}
4949

50-
// remove cancellable context signal handler so we can forward signals to container without compose from exiting
50+
// remove cancellable context signal handler so we can forward signals to container without compose exiting
5151
signal.Reset()
5252

5353
sigc := make(chan os.Signal, 128)

pkg/compose/watch.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ func (s *composeService) watch(ctx context.Context, project *types.Project, opti
247247
}
248248

249249
if shouldInitialSync && isSync(trigger) {
250-
// Need to check initial files are in container that are meant to be synced from watch action
250+
// Need to check that initial files meant to be synced from the watch action are in the container
251251
err := s.initialSync(ctx, project, service, trigger, syncer)
252252
if err != nil {
253253
return nil, err
@@ -761,7 +761,7 @@ func (s *composeService) initialSync(ctx context.Context, project *types.Project
761761
return syncer.Sync(ctx, service.Name, pathsToCopy)
762762
}
763763

764-
// Syncs files from develop.watch.path if thy have been modified after the image has been created
764+
// Syncs files from develop.watch.path if they have been modified after the image has been created
765765
//
766766
//nolint:gocyclo
767767
func (s *composeService) initialSyncFiles(ctx context.Context, project *types.Project, service types.ServiceConfig, trigger types.Trigger, ignore watch.PathMatcher) ([]*sync.PathMapping, error) {

pkg/remote/oci.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const (
4545
)
4646

4747
// validatePathInBase ensures a file path is contained within the base directory,
48-
// as OCI artifacts resources must all live within the same folder.
48+
// as OCI artifact resources must all live within the same folder.
4949
func validatePathInBase(base, unsafePath string) error {
5050
// Reject paths with path separators regardless of OS
5151
if strings.ContainsAny(unsafePath, "\\/") {
@@ -149,7 +149,7 @@ func (g *ociRemoteLoader) Load(ctx context.Context, path string) (string, error)
149149
local = filepath.Join(cache, descriptor.Digest.Hex())
150150
if _, err = os.Stat(local); os.IsNotExist(err) {
151151

152-
// a Compose application bundle is published as image index
152+
// a Compose application bundle is published as an image index
153153
if images.IsIndexType(descriptor.MediaType) {
154154
var index spec.Index
155155
err = json.Unmarshal(content, &index)
@@ -184,7 +184,7 @@ func (g *ociRemoteLoader) Load(ctx context.Context, path string) (string, error)
184184

185185
err = g.pullComposeFiles(ctx, local, manifest, ref, resolver)
186186
if err != nil {
187-
// we need to clean up the directory to be sure we won't let empty files present
187+
// we need to clean up the directory to be sure we won't leave empty files behind
188188
_ = os.RemoveAll(local)
189189
return "", err
190190
}

0 commit comments

Comments
 (0)