@@ -17,6 +17,7 @@ limitations under the License.
1717package differs
1818
1919import (
20+ pkgutil "github.com/GoogleCloudPlatform/container-diff/pkg/util"
2021 "github.com/GoogleCloudPlatform/container-diff/utils"
2122)
2223
@@ -28,7 +29,7 @@ func (a FileAnalyzer) Name() string {
2829}
2930
3031// FileDiff diffs two packages and compares their contents
31- func (a FileAnalyzer ) Diff (image1 , image2 utils .Image ) (utils.Result , error ) {
32+ func (a FileAnalyzer ) Diff (image1 , image2 pkgutil .Image ) (utils.Result , error ) {
3233 diff , err := diffImageFiles (image1 , image2 )
3334 return & utils.DirDiffResult {
3435 Image1 : image1 .Source ,
@@ -38,31 +39,31 @@ func (a FileAnalyzer) Diff(image1, image2 utils.Image) (utils.Result, error) {
3839 }, err
3940}
4041
41- func (a FileAnalyzer ) Analyze (image utils .Image ) (utils.Result , error ) {
42+ func (a FileAnalyzer ) Analyze (image pkgutil .Image ) (utils.Result , error ) {
4243 var result utils.FileAnalyzeResult
4344
44- imgDir , err := utils .GetDirectory (image .FSPath , true )
45+ imgDir , err := pkgutil .GetDirectory (image .FSPath , true )
4546 if err != nil {
4647 return result , err
4748 }
4849
4950 result .Image = image .Source
5051 result .AnalyzeType = "File"
51- result .Analysis = utils .GetDirectoryEntries (imgDir )
52+ result .Analysis = pkgutil .GetDirectoryEntries (imgDir )
5253 return & result , err
5354}
5455
55- func diffImageFiles (image1 , image2 utils .Image ) (utils.DirDiff , error ) {
56+ func diffImageFiles (image1 , image2 pkgutil .Image ) (utils.DirDiff , error ) {
5657 img1 := image1 .FSPath
5758 img2 := image2 .FSPath
5859
5960 var diff utils.DirDiff
6061
61- img1Dir , err := utils .GetDirectory (img1 , true )
62+ img1Dir , err := pkgutil .GetDirectory (img1 , true )
6263 if err != nil {
6364 return diff , err
6465 }
65- img2Dir , err := utils .GetDirectory (img2 , true )
66+ img2Dir , err := pkgutil .GetDirectory (img2 , true )
6667 if err != nil {
6768 return diff , err
6869 }
0 commit comments