diff --git a/README.md b/README.md deleted file mode 100644 index 286c5fd..0000000 --- a/README.md +++ /dev/null @@ -1,11 +0,0 @@ -pkg/ is a collection of utility packages started by the Docker project without being specific to its internals. - -Utility packages are kept separate from the docker core codebase to keep it as small and concise as possible. -If some utilities grow larger and their APIs stabilize, they may be moved to their own repository under the -Docker organization, to facilitate re-use by other projects. However that is not the priority. - -The `pkg` name is after the same directory in the camlistore project. Since Brad is a core -Go maintainer, we thought it made sense to copy his methods for organizing Go code :) Thanks Brad! - -Because utility packages are small and neatly separated from the rest of the codebase, they are a good -place to start for aspiring maintainers and contributors. Get in touch if you want to help maintain them! diff --git a/archive/archive.go b/archive/archive.go index 4fca939..1b78830 100644 --- a/archive/archive.go +++ b/archive/archive.go @@ -18,12 +18,12 @@ import ( "syscall" "github.com/Sirupsen/logrus" - "github.com/containers/pkg/fileutils" - "github.com/containers/pkg/idtools" - "github.com/containers/pkg/ioutils" - "github.com/containers/pkg/pools" - "github.com/containers/pkg/promise" - "github.com/containers/pkg/system" + "github.com/containers/storage/pkg/fileutils" + "github.com/containers/storage/pkg/idtools" + "github.com/containers/storage/pkg/ioutils" + "github.com/containers/storage/pkg/pools" + "github.com/containers/storage/pkg/promise" + "github.com/containers/storage/pkg/system" ) type ( diff --git a/archive/archive_linux.go b/archive/archive_linux.go index 487e4c2..e944ca2 100644 --- a/archive/archive_linux.go +++ b/archive/archive_linux.go @@ -7,7 +7,7 @@ import ( "strings" "syscall" - "github.com/containers/pkg/system" + "github.com/containers/storage/pkg/system" ) func getWhiteoutConverter(format WhiteoutFormat) tarWhiteoutConverter { diff --git a/archive/archive_unix.go b/archive/archive_unix.go index 05cbfe6..19d731f 100644 --- a/archive/archive_unix.go +++ b/archive/archive_unix.go @@ -9,7 +9,7 @@ import ( "path/filepath" "syscall" - "github.com/containers/pkg/system" + "github.com/containers/storage/pkg/system" ) // fixVolumePathPrefix does platform specific processing to ensure that if diff --git a/archive/archive_unix_test.go b/archive/archive_unix_test.go index eee1680..4bf0ae2 100644 --- a/archive/archive_unix_test.go +++ b/archive/archive_unix_test.go @@ -11,7 +11,7 @@ import ( "syscall" "testing" - "github.com/containers/pkg/system" + "github.com/containers/storage/pkg/system" ) func TestCanonicalTarNameForPath(t *testing.T) { diff --git a/archive/archive_windows.go b/archive/archive_windows.go index 71495fa..828d3b9 100644 --- a/archive/archive_windows.go +++ b/archive/archive_windows.go @@ -9,7 +9,7 @@ import ( "path/filepath" "strings" - "github.com/containers/pkg/longpath" + "github.com/containers/storage/pkg/longpath" ) // fixVolumePathPrefix does platform specific processing to ensure that if diff --git a/archive/changes.go b/archive/changes.go index 3d12b03..234b0a6 100644 --- a/archive/changes.go +++ b/archive/changes.go @@ -14,9 +14,9 @@ import ( "time" "github.com/Sirupsen/logrus" - "github.com/containers/pkg/idtools" - "github.com/containers/pkg/pools" - "github.com/containers/pkg/system" + "github.com/containers/storage/pkg/idtools" + "github.com/containers/storage/pkg/pools" + "github.com/containers/storage/pkg/system" ) // ChangeType represents the change type. diff --git a/archive/changes_linux.go b/archive/changes_linux.go index 169f4dc..798d7bf 100644 --- a/archive/changes_linux.go +++ b/archive/changes_linux.go @@ -9,7 +9,7 @@ import ( "syscall" "unsafe" - "github.com/containers/pkg/system" + "github.com/containers/storage/pkg/system" ) // walker is used to implement collectFileInfoForChanges on linux. Where this diff --git a/archive/changes_other.go b/archive/changes_other.go index f25e8b4..e1d1e7a 100644 --- a/archive/changes_other.go +++ b/archive/changes_other.go @@ -9,7 +9,7 @@ import ( "runtime" "strings" - "github.com/containers/pkg/system" + "github.com/containers/storage/pkg/system" ) func collectFileInfoForChanges(oldDir, newDir string) (*FileInfo, *FileInfo, error) { diff --git a/archive/changes_test.go b/archive/changes_test.go index 7d45ace..f19c9fd 100644 --- a/archive/changes_test.go +++ b/archive/changes_test.go @@ -10,7 +10,7 @@ import ( "testing" "time" - "github.com/containers/pkg/system" + "github.com/containers/storage/pkg/system" ) func max(x, y int) int { diff --git a/archive/changes_unix.go b/archive/changes_unix.go index bf4c664..43dd94e 100644 --- a/archive/changes_unix.go +++ b/archive/changes_unix.go @@ -6,7 +6,7 @@ import ( "os" "syscall" - "github.com/containers/pkg/system" + "github.com/containers/storage/pkg/system" ) func statDifferent(oldStat *system.StatT, newStat *system.StatT) bool { diff --git a/archive/changes_windows.go b/archive/changes_windows.go index b8cab3e..06eadd6 100644 --- a/archive/changes_windows.go +++ b/archive/changes_windows.go @@ -3,7 +3,7 @@ package archive import ( "os" - "github.com/containers/pkg/system" + "github.com/containers/storage/pkg/system" ) func statDifferent(oldStat *system.StatT, newStat *system.StatT) bool { diff --git a/archive/copy.go b/archive/copy.go index 488d0a1..05c243d 100644 --- a/archive/copy.go +++ b/archive/copy.go @@ -10,7 +10,7 @@ import ( "strings" "github.com/Sirupsen/logrus" - "github.com/containers/pkg/system" + "github.com/containers/storage/pkg/system" ) // Errors used or returned by this file. diff --git a/archive/diff.go b/archive/diff.go index a53c229..c8d09d3 100644 --- a/archive/diff.go +++ b/archive/diff.go @@ -11,9 +11,9 @@ import ( "strings" "github.com/Sirupsen/logrus" - "github.com/containers/pkg/idtools" - "github.com/containers/pkg/pools" - "github.com/containers/pkg/system" + "github.com/containers/storage/pkg/idtools" + "github.com/containers/storage/pkg/pools" + "github.com/containers/storage/pkg/system" ) // UnpackLayer unpack `layer` to a `dest`. The stream `layer` can be diff --git a/archive/diff_test.go b/archive/diff_test.go index f76511f..b6f654b 100644 --- a/archive/diff_test.go +++ b/archive/diff_test.go @@ -10,7 +10,7 @@ import ( "runtime" "testing" - "github.com/containers/pkg/ioutils" + "github.com/containers/storage/pkg/ioutils" ) func TestApplyLayerInvalidFilenames(t *testing.T) { diff --git a/archive/example_changes.go b/archive/example_changes.go index e4f2024..549f07f 100644 --- a/archive/example_changes.go +++ b/archive/example_changes.go @@ -14,7 +14,7 @@ import ( "path" "github.com/Sirupsen/logrus" - "github.com/containers/pkg/archive" + "github.com/containers/storage/pkg/archive" ) var ( diff --git a/chrootarchive/archive.go b/chrootarchive/archive.go index db9aa5e..649575c 100644 --- a/chrootarchive/archive.go +++ b/chrootarchive/archive.go @@ -7,8 +7,8 @@ import ( "os" "path/filepath" - "github.com/containers/pkg/archive" - "github.com/containers/pkg/idtools" + "github.com/containers/storage/pkg/archive" + "github.com/containers/storage/pkg/idtools" ) var chrootArchiver = &archive.Archiver{Untar: Untar} diff --git a/chrootarchive/archive_test.go b/chrootarchive/archive_test.go index d7ea1d6..4a9b011 100644 --- a/chrootarchive/archive_test.go +++ b/chrootarchive/archive_test.go @@ -13,9 +13,9 @@ import ( "testing" "time" - "github.com/containers/pkg/archive" - "github.com/containers/pkg/reexec" - "github.com/containers/pkg/system" + "github.com/containers/storage/pkg/archive" + "github.com/containers/storage/pkg/reexec" + "github.com/containers/storage/pkg/system" ) func init() { diff --git a/chrootarchive/archive_unix.go b/chrootarchive/archive_unix.go index 43a6c89..e04ed78 100644 --- a/chrootarchive/archive_unix.go +++ b/chrootarchive/archive_unix.go @@ -12,8 +12,8 @@ import ( "os" "runtime" - "github.com/containers/pkg/archive" - "github.com/containers/pkg/reexec" + "github.com/containers/storage/pkg/archive" + "github.com/containers/storage/pkg/reexec" ) // untar is the entry-point for storage-untar on re-exec. This is not used on diff --git a/chrootarchive/archive_windows.go b/chrootarchive/archive_windows.go index 9662d25..93fde42 100644 --- a/chrootarchive/archive_windows.go +++ b/chrootarchive/archive_windows.go @@ -3,8 +3,8 @@ package chrootarchive import ( "io" - "github.com/containers/pkg/archive" - "github.com/containers/pkg/longpath" + "github.com/containers/storage/pkg/archive" + "github.com/containers/storage/pkg/longpath" ) // chroot is not supported by Windows diff --git a/chrootarchive/chroot_linux.go b/chrootarchive/chroot_linux.go index d3e7c45..54b5ff4 100644 --- a/chrootarchive/chroot_linux.go +++ b/chrootarchive/chroot_linux.go @@ -7,7 +7,7 @@ import ( "path/filepath" "syscall" - "github.com/containers/pkg/mount" + "github.com/containers/storage/pkg/mount" ) // chroot on linux uses pivot_root instead of chroot diff --git a/chrootarchive/diff.go b/chrootarchive/diff.go index 0c3e1da..377aeb9 100644 --- a/chrootarchive/diff.go +++ b/chrootarchive/diff.go @@ -1,6 +1,6 @@ package chrootarchive -import "github.com/containers/pkg/archive" +import "github.com/containers/storage/pkg/archive" // ApplyLayer parses a diff in the standard layer format from `layer`, // and applies it to the directory `dest`. The stream `layer` can only be diff --git a/chrootarchive/diff_unix.go b/chrootarchive/diff_unix.go index 7c79c8d..3a9f9a8 100644 --- a/chrootarchive/diff_unix.go +++ b/chrootarchive/diff_unix.go @@ -12,9 +12,9 @@ import ( "path/filepath" "runtime" - "github.com/containers/pkg/archive" - "github.com/containers/pkg/reexec" - "github.com/containers/pkg/system" + "github.com/containers/storage/pkg/archive" + "github.com/containers/storage/pkg/reexec" + "github.com/containers/storage/pkg/system" ) type applyLayerResponse struct { diff --git a/chrootarchive/diff_windows.go b/chrootarchive/diff_windows.go index 5a1a340..534d270 100644 --- a/chrootarchive/diff_windows.go +++ b/chrootarchive/diff_windows.go @@ -6,8 +6,8 @@ import ( "os" "path/filepath" - "github.com/containers/pkg/archive" - "github.com/containers/pkg/longpath" + "github.com/containers/storage/pkg/archive" + "github.com/containers/storage/pkg/longpath" ) // applyLayerHandler parses a diff in the standard layer format from `layer`, and diff --git a/chrootarchive/init_unix.go b/chrootarchive/init_unix.go index e5e8532..21cd879 100644 --- a/chrootarchive/init_unix.go +++ b/chrootarchive/init_unix.go @@ -8,7 +8,7 @@ import ( "io/ioutil" "os" - "github.com/containers/pkg/reexec" + "github.com/containers/storage/pkg/reexec" ) func init() { diff --git a/idtools/idtools_unix.go b/idtools/idtools_unix.go index 0289f91..b2cfb05 100644 --- a/idtools/idtools_unix.go +++ b/idtools/idtools_unix.go @@ -6,7 +6,7 @@ import ( "os" "path/filepath" - "github.com/containers/pkg/system" + "github.com/containers/storage/pkg/system" ) func mkdirAs(path string, mode os.FileMode, ownerUID, ownerGID int, mkAll, chownExisting bool) error { diff --git a/idtools/idtools_windows.go b/idtools/idtools_windows.go index 6e58e9e..0cad173 100644 --- a/idtools/idtools_windows.go +++ b/idtools/idtools_windows.go @@ -5,7 +5,7 @@ package idtools import ( "os" - "github.com/containers/pkg/system" + "github.com/containers/storage/pkg/system" ) // Platforms such as Windows do not support the UID/GID concept. So make this diff --git a/integration/utils.go b/integration/utils.go index 0604e65..806d611 100644 --- a/integration/utils.go +++ b/integration/utils.go @@ -15,7 +15,7 @@ import ( "syscall" "time" - "github.com/containers/pkg/stringutils" + "github.com/containers/storage/pkg/stringutils" ) // GetExitCode returns the ExitStatus of the specified error if its type is diff --git a/ioutils/temp_windows.go b/ioutils/temp_windows.go index 611ff77..c719c12 100644 --- a/ioutils/temp_windows.go +++ b/ioutils/temp_windows.go @@ -5,7 +5,7 @@ package ioutils import ( "io/ioutil" - "github.com/containers/pkg/longpath" + "github.com/containers/storage/pkg/longpath" ) // TempDir is the equivalent of ioutil.TempDir, except that the result is in Windows longpath format. diff --git a/mflag/example/example.go b/mflag/example/example.go index 384a1ca..0911d09 100644 --- a/mflag/example/example.go +++ b/mflag/example/example.go @@ -3,7 +3,7 @@ package main import ( "fmt" - flag "github.com/containers/pkg/mflag" + flag "github.com/containers/storage/pkg/mflag" ) var ( diff --git a/mflag/flag.go b/mflag/flag.go index 2f8ad5d..e4ce141 100644 --- a/mflag/flag.go +++ b/mflag/flag.go @@ -9,7 +9,7 @@ // Define flags using flag.String(), Bool(), Int(), etc. // // This declares an integer flag, -f or --flagname, stored in the pointer ip, with type *int. -// import "flag /github.com/containers/pkg/mflag" +// import "flag /github.com/containers/storage/pkg/mflag" // var ip = flag.Int([]string{"f", "-flagname"}, 1234, "help message for flagname") // If you like, you can bind the flag to a variable using the Var() functions. // var flagvar int @@ -92,7 +92,7 @@ import ( "text/tabwriter" "time" - "github.com/containers/pkg/homedir" + "github.com/containers/storage/pkg/homedir" ) // ErrHelp is the error returned if the flag -help is invoked but no such flag is defined. diff --git a/plugins/client.go b/plugins/client.go index cc89c12..a8865a0 100644 --- a/plugins/client.go +++ b/plugins/client.go @@ -10,7 +10,7 @@ import ( "time" "github.com/Sirupsen/logrus" - "github.com/containers/pkg/plugins/transport" + "github.com/containers/storage/pkg/plugins/transport" "github.com/docker/go-connections/sockets" "github.com/docker/go-connections/tlsconfig" ) diff --git a/plugins/client_test.go b/plugins/client_test.go index e08cb98..56b3d71 100644 --- a/plugins/client_test.go +++ b/plugins/client_test.go @@ -9,7 +9,7 @@ import ( "testing" "time" - "github.com/containers/pkg/plugins/transport" + "github.com/containers/storage/pkg/plugins/transport" "github.com/docker/go-connections/tlsconfig" ) diff --git a/plugins/pluginrpc-gen/fixtures/foo.go b/plugins/pluginrpc-gen/fixtures/foo.go index 5a0e03c..642cefe 100644 --- a/plugins/pluginrpc-gen/fixtures/foo.go +++ b/plugins/pluginrpc-gen/fixtures/foo.go @@ -5,7 +5,7 @@ import ( aliasedio "io" - "github.com/containers/pkg/plugins/pluginrpc-gen/fixtures/otherfixture" + "github.com/containers/storage/pkg/plugins/pluginrpc-gen/fixtures/otherfixture" ) var ( diff --git a/pools/pools.go b/pools/pools.go index bf63183..a15e368 100644 --- a/pools/pools.go +++ b/pools/pools.go @@ -14,7 +14,7 @@ import ( "io" "sync" - "github.com/containers/pkg/ioutils" + "github.com/containers/storage/pkg/ioutils" ) var ( diff --git a/stringid/stringid.go b/stringid/stringid.go index 2ca4587..74dfaaa 100644 --- a/stringid/stringid.go +++ b/stringid/stringid.go @@ -9,7 +9,7 @@ import ( "strconv" "strings" - "github.com/containers/pkg/random" + "github.com/containers/storage/pkg/random" ) const shortLen = 12 diff --git a/stringutils/stringutils.go b/stringutils/stringutils.go index e9e2ae5..078ceaf 100644 --- a/stringutils/stringutils.go +++ b/stringutils/stringutils.go @@ -6,7 +6,7 @@ import ( "math/rand" "strings" - "github.com/containers/pkg/random" + "github.com/containers/storage/pkg/random" ) // GenerateRandomAlphaOnlyString generates an alphabetical random string with length n.