From ee72ee177dafba0011faade4c6d8eb61c10f88ed Mon Sep 17 00:00:00 2001 From: Alessandro Boch Date: Sat, 16 May 2015 16:02:51 -0700 Subject: [PATCH] Remove pkg directory - As recommended by Docker committers. - Will introduce internal directory when go supports it Signed-off-by: Alessandro Boch --- api/api_test.go | 4 ++-- cmd/readme_test/readme.go | 4 ++-- cmd/test/main.go | 2 +- drivers/bridge/bridge.go | 4 ++-- drivers/bridge/bridge_test.go | 4 ++-- drivers/bridge/link.go | 2 +- drivers/bridge/network_test.go | 2 +- drivers/bridge/port_mapping_test.go | 2 +- drivers/bridge/setup_ip_tables.go | 2 +- drivers/bridge/setup_ip_tables_test.go | 2 +- endpoint.go | 6 +++--- {pkg/etchosts => etchosts}/etchosts.go | 0 {pkg/etchosts => etchosts}/etchosts_test.go | 0 {pkg/iptables => iptables}/firewalld.go | 0 {pkg/iptables => iptables}/firewalld_test.go | 0 {pkg/iptables => iptables}/iptables.go | 0 {pkg/iptables => iptables}/iptables_test.go | 0 libnetwork_test.go | 4 ++-- {pkg/netlabel => netlabel}/labels.go | 0 network.go | 4 ++-- {pkg/options => options}/options.go | 0 {pkg/options => options}/options_test.go | 0 {pkg/portallocator => portallocator}/portallocator.go | 0 {pkg/portallocator => portallocator}/portallocator_test.go | 0 portmapper/mapper.go | 4 ++-- portmapper/mapper_test.go | 2 +- {pkg/resolvconf => resolvconf}/README.md | 0 {pkg/resolvconf => resolvconf}/dns/resolvconf.go | 0 {pkg/resolvconf => resolvconf}/resolvconf.go | 2 +- {pkg/resolvconf => resolvconf}/resolvconf_test.go | 0 30 files changed, 25 insertions(+), 25 deletions(-) rename {pkg/etchosts => etchosts}/etchosts.go (100%) rename {pkg/etchosts => etchosts}/etchosts_test.go (100%) rename {pkg/iptables => iptables}/firewalld.go (100%) rename {pkg/iptables => iptables}/firewalld_test.go (100%) rename {pkg/iptables => iptables}/iptables.go (100%) rename {pkg/iptables => iptables}/iptables_test.go (100%) rename {pkg/netlabel => netlabel}/labels.go (100%) rename {pkg/options => options}/options.go (100%) rename {pkg/options => options}/options_test.go (100%) rename {pkg/portallocator => portallocator}/portallocator.go (100%) rename {pkg/portallocator => portallocator}/portallocator_test.go (100%) rename {pkg/resolvconf => resolvconf}/README.md (100%) rename {pkg/resolvconf => resolvconf}/dns/resolvconf.go (100%) rename {pkg/resolvconf => resolvconf}/resolvconf.go (99%) rename {pkg/resolvconf => resolvconf}/resolvconf_test.go (100%) diff --git a/api/api_test.go b/api/api_test.go index eb71fb7..5065379 100644 --- a/api/api_test.go +++ b/api/api_test.go @@ -13,9 +13,9 @@ import ( "github.com/docker/docker/pkg/reexec" "github.com/docker/libnetwork" + "github.com/docker/libnetwork/netlabel" "github.com/docker/libnetwork/netutils" - "github.com/docker/libnetwork/pkg/netlabel" - "github.com/docker/libnetwork/pkg/options" + "github.com/docker/libnetwork/options" ) const ( diff --git a/cmd/readme_test/readme.go b/cmd/readme_test/readme.go index ef21f48..985fb94 100644 --- a/cmd/readme_test/readme.go +++ b/cmd/readme_test/readme.go @@ -4,9 +4,9 @@ import ( "fmt" "github.com/docker/libnetwork" + "github.com/docker/libnetwork/netlabel" "github.com/docker/libnetwork/netutils" - "github.com/docker/libnetwork/pkg/netlabel" - "github.com/docker/libnetwork/pkg/options" + "github.com/docker/libnetwork/options" ) func main() { diff --git a/cmd/test/main.go b/cmd/test/main.go index 98d7cff..d944654 100644 --- a/cmd/test/main.go +++ b/cmd/test/main.go @@ -6,7 +6,7 @@ import ( "net" "github.com/docker/libnetwork" - "github.com/docker/libnetwork/pkg/options" + "github.com/docker/libnetwork/options" ) func main() { diff --git a/drivers/bridge/bridge.go b/drivers/bridge/bridge.go index 4c0355e..6160ba7 100644 --- a/drivers/bridge/bridge.go +++ b/drivers/bridge/bridge.go @@ -7,9 +7,9 @@ import ( "github.com/docker/libnetwork/driverapi" "github.com/docker/libnetwork/ipallocator" + "github.com/docker/libnetwork/netlabel" "github.com/docker/libnetwork/netutils" - "github.com/docker/libnetwork/pkg/netlabel" - "github.com/docker/libnetwork/pkg/options" + "github.com/docker/libnetwork/options" "github.com/docker/libnetwork/portmapper" "github.com/docker/libnetwork/sandbox" "github.com/docker/libnetwork/types" diff --git a/drivers/bridge/bridge_test.go b/drivers/bridge/bridge_test.go index 4bc77d0..e47bf08 100644 --- a/drivers/bridge/bridge_test.go +++ b/drivers/bridge/bridge_test.go @@ -7,9 +7,9 @@ import ( "regexp" "testing" + "github.com/docker/libnetwork/iptables" + "github.com/docker/libnetwork/netlabel" "github.com/docker/libnetwork/netutils" - "github.com/docker/libnetwork/pkg/iptables" - "github.com/docker/libnetwork/pkg/netlabel" "github.com/vishvananda/netlink" ) diff --git a/drivers/bridge/link.go b/drivers/bridge/link.go index be77134..05a99dc 100644 --- a/drivers/bridge/link.go +++ b/drivers/bridge/link.go @@ -5,8 +5,8 @@ import ( "net" log "github.com/Sirupsen/logrus" + "github.com/docker/libnetwork/iptables" "github.com/docker/libnetwork/netutils" - "github.com/docker/libnetwork/pkg/iptables" ) type link struct { diff --git a/drivers/bridge/network_test.go b/drivers/bridge/network_test.go index daa9c58..322ad59 100644 --- a/drivers/bridge/network_test.go +++ b/drivers/bridge/network_test.go @@ -4,8 +4,8 @@ import ( "testing" "github.com/docker/libnetwork/driverapi" + "github.com/docker/libnetwork/netlabel" "github.com/docker/libnetwork/netutils" - "github.com/docker/libnetwork/pkg/netlabel" "github.com/vishvananda/netlink" ) diff --git a/drivers/bridge/port_mapping_test.go b/drivers/bridge/port_mapping_test.go index eaa5479..96c15e6 100644 --- a/drivers/bridge/port_mapping_test.go +++ b/drivers/bridge/port_mapping_test.go @@ -5,8 +5,8 @@ import ( "testing" "github.com/docker/docker/pkg/reexec" + "github.com/docker/libnetwork/netlabel" "github.com/docker/libnetwork/netutils" - "github.com/docker/libnetwork/pkg/netlabel" ) func TestMain(m *testing.M) { diff --git a/drivers/bridge/setup_ip_tables.go b/drivers/bridge/setup_ip_tables.go index 6da0a00..18aa88a 100644 --- a/drivers/bridge/setup_ip_tables.go +++ b/drivers/bridge/setup_ip_tables.go @@ -4,8 +4,8 @@ import ( "fmt" "net" + "github.com/docker/libnetwork/iptables" "github.com/docker/libnetwork/netutils" - "github.com/docker/libnetwork/pkg/iptables" ) // DockerChain: DOCKER iptable chain name diff --git a/drivers/bridge/setup_ip_tables_test.go b/drivers/bridge/setup_ip_tables_test.go index 35dd0d7..1c73ba9 100644 --- a/drivers/bridge/setup_ip_tables_test.go +++ b/drivers/bridge/setup_ip_tables_test.go @@ -4,8 +4,8 @@ import ( "net" "testing" + "github.com/docker/libnetwork/iptables" "github.com/docker/libnetwork/netutils" - "github.com/docker/libnetwork/pkg/iptables" ) const ( diff --git a/endpoint.go b/endpoint.go index 702193d..dba15a0 100644 --- a/endpoint.go +++ b/endpoint.go @@ -11,10 +11,10 @@ import ( "github.com/Sirupsen/logrus" "github.com/docker/docker/pkg/ioutils" "github.com/docker/libnetwork/driverapi" + "github.com/docker/libnetwork/etchosts" + "github.com/docker/libnetwork/netlabel" "github.com/docker/libnetwork/netutils" - "github.com/docker/libnetwork/pkg/etchosts" - "github.com/docker/libnetwork/pkg/netlabel" - "github.com/docker/libnetwork/pkg/resolvconf" + "github.com/docker/libnetwork/resolvconf" "github.com/docker/libnetwork/sandbox" "github.com/docker/libnetwork/types" ) diff --git a/pkg/etchosts/etchosts.go b/etchosts/etchosts.go similarity index 100% rename from pkg/etchosts/etchosts.go rename to etchosts/etchosts.go diff --git a/pkg/etchosts/etchosts_test.go b/etchosts/etchosts_test.go similarity index 100% rename from pkg/etchosts/etchosts_test.go rename to etchosts/etchosts_test.go diff --git a/pkg/iptables/firewalld.go b/iptables/firewalld.go similarity index 100% rename from pkg/iptables/firewalld.go rename to iptables/firewalld.go diff --git a/pkg/iptables/firewalld_test.go b/iptables/firewalld_test.go similarity index 100% rename from pkg/iptables/firewalld_test.go rename to iptables/firewalld_test.go diff --git a/pkg/iptables/iptables.go b/iptables/iptables.go similarity index 100% rename from pkg/iptables/iptables.go rename to iptables/iptables.go diff --git a/pkg/iptables/iptables_test.go b/iptables/iptables_test.go similarity index 100% rename from pkg/iptables/iptables_test.go rename to iptables/iptables_test.go diff --git a/libnetwork_test.go b/libnetwork_test.go index 2a020ad..0ebb654 100644 --- a/libnetwork_test.go +++ b/libnetwork_test.go @@ -15,9 +15,9 @@ import ( log "github.com/Sirupsen/logrus" "github.com/docker/docker/pkg/reexec" "github.com/docker/libnetwork" + "github.com/docker/libnetwork/netlabel" "github.com/docker/libnetwork/netutils" - "github.com/docker/libnetwork/pkg/netlabel" - "github.com/docker/libnetwork/pkg/options" + "github.com/docker/libnetwork/options" "github.com/vishvananda/netns" ) diff --git a/pkg/netlabel/labels.go b/netlabel/labels.go similarity index 100% rename from pkg/netlabel/labels.go rename to netlabel/labels.go diff --git a/network.go b/network.go index 8040f79..8894597 100644 --- a/network.go +++ b/network.go @@ -5,8 +5,8 @@ import ( "github.com/docker/docker/pkg/stringid" "github.com/docker/libnetwork/driverapi" - "github.com/docker/libnetwork/pkg/netlabel" - "github.com/docker/libnetwork/pkg/options" + "github.com/docker/libnetwork/netlabel" + "github.com/docker/libnetwork/options" "github.com/docker/libnetwork/types" ) diff --git a/pkg/options/options.go b/options/options.go similarity index 100% rename from pkg/options/options.go rename to options/options.go diff --git a/pkg/options/options_test.go b/options/options_test.go similarity index 100% rename from pkg/options/options_test.go rename to options/options_test.go diff --git a/pkg/portallocator/portallocator.go b/portallocator/portallocator.go similarity index 100% rename from pkg/portallocator/portallocator.go rename to portallocator/portallocator.go diff --git a/pkg/portallocator/portallocator_test.go b/portallocator/portallocator_test.go similarity index 100% rename from pkg/portallocator/portallocator_test.go rename to portallocator/portallocator_test.go diff --git a/portmapper/mapper.go b/portmapper/mapper.go index e4532ae..0dc0165 100644 --- a/portmapper/mapper.go +++ b/portmapper/mapper.go @@ -7,8 +7,8 @@ import ( "sync" "github.com/Sirupsen/logrus" - "github.com/docker/libnetwork/pkg/iptables" - "github.com/docker/libnetwork/pkg/portallocator" + "github.com/docker/libnetwork/iptables" + "github.com/docker/libnetwork/portallocator" ) type mapping struct { diff --git a/portmapper/mapper_test.go b/portmapper/mapper_test.go index 6f304da..ac6cf72 100644 --- a/portmapper/mapper_test.go +++ b/portmapper/mapper_test.go @@ -7,8 +7,8 @@ import ( "time" "github.com/docker/docker/pkg/reexec" + "github.com/docker/libnetwork/iptables" "github.com/docker/libnetwork/netutils" - "github.com/docker/libnetwork/pkg/iptables" ) func TestMain(m *testing.M) { diff --git a/pkg/resolvconf/README.md b/resolvconf/README.md similarity index 100% rename from pkg/resolvconf/README.md rename to resolvconf/README.md diff --git a/pkg/resolvconf/dns/resolvconf.go b/resolvconf/dns/resolvconf.go similarity index 100% rename from pkg/resolvconf/dns/resolvconf.go rename to resolvconf/dns/resolvconf.go diff --git a/pkg/resolvconf/resolvconf.go b/resolvconf/resolvconf.go similarity index 99% rename from pkg/resolvconf/resolvconf.go rename to resolvconf/resolvconf.go index ae6c4e6..ebe3b71 100644 --- a/pkg/resolvconf/resolvconf.go +++ b/resolvconf/resolvconf.go @@ -10,7 +10,7 @@ import ( "github.com/Sirupsen/logrus" "github.com/docker/docker/pkg/ioutils" - "github.com/docker/libnetwork/pkg/resolvconf/dns" + "github.com/docker/libnetwork/resolvconf/dns" ) var ( diff --git a/pkg/resolvconf/resolvconf_test.go b/resolvconf/resolvconf_test.go similarity index 100% rename from pkg/resolvconf/resolvconf_test.go rename to resolvconf/resolvconf_test.go