1212// See the License for the specific language governing permissions and
1313// limitations under the License.
1414
15- package image
15+ package utils
1616
1717import (
1818 "archive/tar"
@@ -27,7 +27,6 @@ import (
2727 "time"
2828
2929 "github.com/Sirupsen/logrus"
30- "github.com/opencontainers/image-tools/utils"
3130)
3231
3332// ChangeType represents the change type.
@@ -67,7 +66,7 @@ func sameFsTimeSpec(a, b syscall.Timespec) bool {
6766type FileInfo struct {
6867 parent * FileInfo
6968 name string
70- stat * utils. StatT
69+ stat * StatT
7170 children map [string ]* FileInfo
7271 capability []byte
7372 added bool
@@ -225,16 +224,16 @@ func ChangesDirs(newDir, oldDir string) ([]Change, error) {
225224}
226225
227226// ExportChanges produces an Archive from the provided changes, relative to dir.
228- func exportChanges (dir string , changes []Change ) (io.ReadCloser , error ) {
227+ func ExportChanges (dir string , changes []Change ) (io.ReadCloser , error ) {
229228 reader , writer := io .Pipe ()
230229 go func () {
231- ta := & utils. TarAppender {
230+ ta := & TarAppender {
232231 TarWriter : tar .NewWriter (writer ),
233- Buffer : utils . BufioWriter32KPool .Get (nil ),
232+ Buffer : BufioWriter32KPool .Get (nil ),
234233 SeenFiles : make (map [uint64 ]string ),
235234 }
236235 // this buffer is needed for the duration of this piped stream
237- defer utils . BufioWriter32KPool .Put (ta .Buffer )
236+ defer BufioWriter32KPool .Put (ta .Buffer )
238237
239238 sort .Sort (changesByPath (changes ))
240239
0 commit comments