Skip to content

Commit 087d09d

Browse files
committed
rename LocateManifestSlices to FindPaths
1 parent dad0ed7 commit 087d09d

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

‎internal/manifest/manifest.go‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,9 @@ func Validate(manifest *Manifest) (err error) {
163163
return nil
164164
}
165165

166-
// LocateManifestSlices finds the paths marked with "generate:manifest" and
166+
// FindPaths finds the paths marked with "generate:manifest" and
167167
// returns a map from the manifest path to all the slices that declare it.
168-
func LocateManifestSlices(slices []*setup.Slice, manifestFileName string) map[string][]*setup.Slice {
168+
func FindPaths(slices []*setup.Slice, manifestFileName string) map[string][]*setup.Slice {
169169
manifestSlices := make(map[string][]*setup.Slice)
170170
for _, slice := range slices {
171171
for path, info := range slice.Contents {
@@ -183,7 +183,7 @@ type WriteOptions struct {
183183
PackageInfo []*archive.PackageInfo
184184
Selection []*setup.Slice
185185
// Map manifest path to all the slices that declare it. See
186-
// LocateManifestSlices.
186+
// manifest.FindPaths.
187187
ManifestSlices map[string][]*setup.Slice
188188
Report *Report
189189
}

‎internal/manifest/manifest_test.go‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ func (s *S) TestManifestReadValidate(c *C) {
173173
}
174174
}
175175

176-
var locateManifestSlicesTests = []struct {
176+
var findPathsTests = []struct {
177177
summary string
178178
slices []*setup.Slice
179179
filename string
@@ -246,11 +246,11 @@ var locateManifestSlicesTests = []struct {
246246
},
247247
}}
248248

249-
func (s *S) TestLocateManifestSlices(c *C) {
250-
for _, test := range locateManifestSlicesTests {
249+
func (s *S) TestFindPaths(c *C) {
250+
for _, test := range findPathsTests {
251251
c.Logf("Summary: %s", test.summary)
252252

253-
manifestSlices := manifest.LocateManifestSlices(test.slices, test.filename)
253+
manifestSlices := manifest.FindPaths(test.slices, test.filename)
254254

255255
slicesByName := map[string]*setup.Slice{}
256256
for _, slice := range test.slices {

‎internal/slicer/slicer.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ func Run(options *RunOptions) error {
330330
return err
331331
}
332332

333-
manifestSlices := manifest.LocateManifestSlices(options.Selection.Slices, manifestFilename)
333+
manifestSlices := manifest.FindPaths(options.Selection.Slices, manifestFilename)
334334
if len(manifestSlices) > 0 {
335335
var writers []io.Writer
336336
for relPath, slices := range manifestSlices {

0 commit comments

Comments
 (0)