Skip to content

Commit

Permalink
rename: decodeStacks -> decodeStack as a stack is the whole thing and…
Browse files Browse the repository at this point in the history
… stacks is used to refer to *.tstack.hcl files
  • Loading branch information
ansgarm committed Jul 5, 2024
1 parent a8cf88f commit a632a94
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions internal/features/stacks/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func (f *StacksFeature) didOpen(ctx context.Context, dir document.DirHandle, lan
return ids, err
}

return f.decodeStacks(ctx, dir, false, true)
return f.decodeStack(ctx, dir, false, true)
}

func (f *StacksFeature) didChange(ctx context.Context, dir document.DirHandle) (job.IDs, error) {
Expand All @@ -64,7 +64,7 @@ func (f *StacksFeature) didChange(ctx context.Context, dir document.DirHandle) (
return job.IDs{}, nil
}

return f.decodeStacks(ctx, dir, true, true)
return f.decodeStack(ctx, dir, true, true)
}

func (f *StacksFeature) didChangeWatched(ctx context.Context, rawPath string, changeType protocol.FileChangeType, isDir bool) (job.IDs, error) {
Expand Down Expand Up @@ -117,7 +117,7 @@ func (f *StacksFeature) didChangeWatched(ctx context.Context, rawPath string, ch
return ids, nil
}

return f.decodeStacks(ctx, dir, true, true)
return f.decodeStack(ctx, dir, true, true)

case protocol.Changed:
fallthrough
Expand Down Expand Up @@ -145,13 +145,13 @@ func (f *StacksFeature) didChangeWatched(ctx context.Context, rawPath string, ch
return ids, nil
}

return f.decodeStacks(ctx, dir, true, true)
return f.decodeStack(ctx, dir, true, true)
}

return nil, nil
}

func (f *StacksFeature) decodeStacks(ctx context.Context, dir document.DirHandle, ignoreState bool, isFirstLevel bool) (job.IDs, error) {
func (f *StacksFeature) decodeStack(ctx context.Context, dir document.DirHandle, ignoreState bool, isFirstLevel bool) (job.IDs, error) {
ids := make(job.IDs, 0)
path := dir.Path()

Expand Down

0 comments on commit a632a94

Please sign in to comment.