From f16db2c3ad1c1c5b2de3329b196dec706b7191e8 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 --- libnetwork/api/api_test.go | 4 ++-- libnetwork/cmd/readme_test/readme.go | 4 ++-- libnetwork/cmd/test/main.go | 2 +- libnetwork/drivers/bridge/bridge.go | 4 ++-- libnetwork/drivers/bridge/bridge_test.go | 4 ++-- libnetwork/drivers/bridge/link.go | 2 +- libnetwork/drivers/bridge/network_test.go | 2 +- libnetwork/drivers/bridge/port_mapping_test.go | 2 +- libnetwork/drivers/bridge/setup_ip_tables.go | 2 +- libnetwork/drivers/bridge/setup_ip_tables_test.go | 2 +- libnetwork/endpoint.go | 6 +++--- libnetwork/{pkg => }/etchosts/etchosts.go | 0 libnetwork/{pkg => }/etchosts/etchosts_test.go | 0 libnetwork/{pkg => }/iptables/firewalld.go | 0 libnetwork/{pkg => }/iptables/firewalld_test.go | 0 libnetwork/{pkg => }/iptables/iptables.go | 0 libnetwork/{pkg => }/iptables/iptables_test.go | 0 libnetwork/libnetwork_test.go | 4 ++-- libnetwork/{pkg => }/netlabel/labels.go | 0 libnetwork/network.go | 4 ++-- libnetwork/{pkg => }/options/options.go | 0 libnetwork/{pkg => }/options/options_test.go | 0 libnetwork/{pkg => }/portallocator/portallocator.go | 0 libnetwork/{pkg => }/portallocator/portallocator_test.go | 0 libnetwork/portmapper/mapper.go | 4 ++-- libnetwork/portmapper/mapper_test.go | 2 +- libnetwork/{pkg => }/resolvconf/README.md | 0 libnetwork/{pkg => }/resolvconf/dns/resolvconf.go | 0 libnetwork/{pkg => }/resolvconf/resolvconf.go | 2 +- libnetwork/{pkg => }/resolvconf/resolvconf_test.go | 0 30 files changed, 25 insertions(+), 25 deletions(-) rename libnetwork/{pkg => }/etchosts/etchosts.go (100%) rename libnetwork/{pkg => }/etchosts/etchosts_test.go (100%) rename libnetwork/{pkg => }/iptables/firewalld.go (100%) rename libnetwork/{pkg => }/iptables/firewalld_test.go (100%) rename libnetwork/{pkg => }/iptables/iptables.go (100%) rename libnetwork/{pkg => }/iptables/iptables_test.go (100%) rename libnetwork/{pkg => }/netlabel/labels.go (100%) rename libnetwork/{pkg => }/options/options.go (100%) rename libnetwork/{pkg => }/options/options_test.go (100%) rename libnetwork/{pkg => }/portallocator/portallocator.go (100%) rename libnetwork/{pkg => }/portallocator/portallocator_test.go (100%) rename libnetwork/{pkg => }/resolvconf/README.md (100%) rename libnetwork/{pkg => }/resolvconf/dns/resolvconf.go (100%) rename libnetwork/{pkg => }/resolvconf/resolvconf.go (99%) rename libnetwork/{pkg => }/resolvconf/resolvconf_test.go (100%) diff --git a/libnetwork/api/api_test.go b/libnetwork/api/api_test.go index eb71fb7f40..5065379ccf 100644 --- a/libnetwork/api/api_test.go +++ b/libnetwork/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/libnetwork/cmd/readme_test/readme.go b/libnetwork/cmd/readme_test/readme.go index ef21f4887b..985fb94172 100644 --- a/libnetwork/cmd/readme_test/readme.go +++ b/libnetwork/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/libnetwork/cmd/test/main.go b/libnetwork/cmd/test/main.go index 98d7cff358..d944654bff 100644 --- a/libnetwork/cmd/test/main.go +++ b/libnetwork/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/libnetwork/drivers/bridge/bridge.go b/libnetwork/drivers/bridge/bridge.go index 4c0355e1b9..6160ba7840 100644 --- a/libnetwork/drivers/bridge/bridge.go +++ b/libnetwork/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/libnetwork/drivers/bridge/bridge_test.go b/libnetwork/drivers/bridge/bridge_test.go index 4bc77d0d04..e47bf083bb 100644 --- a/libnetwork/drivers/bridge/bridge_test.go +++ b/libnetwork/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/libnetwork/drivers/bridge/link.go b/libnetwork/drivers/bridge/link.go index be77134037..05a99dc0e4 100644 --- a/libnetwork/drivers/bridge/link.go +++ b/libnetwork/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/libnetwork/drivers/bridge/network_test.go b/libnetwork/drivers/bridge/network_test.go index daa9c58588..322ad5991a 100644 --- a/libnetwork/drivers/bridge/network_test.go +++ b/libnetwork/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/libnetwork/drivers/bridge/port_mapping_test.go b/libnetwork/drivers/bridge/port_mapping_test.go index eaa5479135..96c15e6874 100644 --- a/libnetwork/drivers/bridge/port_mapping_test.go +++ b/libnetwork/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/libnetwork/drivers/bridge/setup_ip_tables.go b/libnetwork/drivers/bridge/setup_ip_tables.go index 6da0a00733..18aa88abbb 100644 --- a/libnetwork/drivers/bridge/setup_ip_tables.go +++ b/libnetwork/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/libnetwork/drivers/bridge/setup_ip_tables_test.go b/libnetwork/drivers/bridge/setup_ip_tables_test.go index 35dd0d7f2d..1c73ba9d7b 100644 --- a/libnetwork/drivers/bridge/setup_ip_tables_test.go +++ b/libnetwork/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/libnetwork/endpoint.go b/libnetwork/endpoint.go index 702193da24..dba15a063c 100644 --- a/libnetwork/endpoint.go +++ b/libnetwork/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/libnetwork/pkg/etchosts/etchosts.go b/libnetwork/etchosts/etchosts.go similarity index 100% rename from libnetwork/pkg/etchosts/etchosts.go rename to libnetwork/etchosts/etchosts.go diff --git a/libnetwork/pkg/etchosts/etchosts_test.go b/libnetwork/etchosts/etchosts_test.go similarity index 100% rename from libnetwork/pkg/etchosts/etchosts_test.go rename to libnetwork/etchosts/etchosts_test.go diff --git a/libnetwork/pkg/iptables/firewalld.go b/libnetwork/iptables/firewalld.go similarity index 100% rename from libnetwork/pkg/iptables/firewalld.go rename to libnetwork/iptables/firewalld.go diff --git a/libnetwork/pkg/iptables/firewalld_test.go b/libnetwork/iptables/firewalld_test.go similarity index 100% rename from libnetwork/pkg/iptables/firewalld_test.go rename to libnetwork/iptables/firewalld_test.go diff --git a/libnetwork/pkg/iptables/iptables.go b/libnetwork/iptables/iptables.go similarity index 100% rename from libnetwork/pkg/iptables/iptables.go rename to libnetwork/iptables/iptables.go diff --git a/libnetwork/pkg/iptables/iptables_test.go b/libnetwork/iptables/iptables_test.go similarity index 100% rename from libnetwork/pkg/iptables/iptables_test.go rename to libnetwork/iptables/iptables_test.go diff --git a/libnetwork/libnetwork_test.go b/libnetwork/libnetwork_test.go index 2a020ada37..0ebb654d61 100644 --- a/libnetwork/libnetwork_test.go +++ b/libnetwork/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/libnetwork/pkg/netlabel/labels.go b/libnetwork/netlabel/labels.go similarity index 100% rename from libnetwork/pkg/netlabel/labels.go rename to libnetwork/netlabel/labels.go diff --git a/libnetwork/network.go b/libnetwork/network.go index 8040f7941e..8894597bec 100644 --- a/libnetwork/network.go +++ b/libnetwork/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/libnetwork/pkg/options/options.go b/libnetwork/options/options.go similarity index 100% rename from libnetwork/pkg/options/options.go rename to libnetwork/options/options.go diff --git a/libnetwork/pkg/options/options_test.go b/libnetwork/options/options_test.go similarity index 100% rename from libnetwork/pkg/options/options_test.go rename to libnetwork/options/options_test.go diff --git a/libnetwork/pkg/portallocator/portallocator.go b/libnetwork/portallocator/portallocator.go similarity index 100% rename from libnetwork/pkg/portallocator/portallocator.go rename to libnetwork/portallocator/portallocator.go diff --git a/libnetwork/pkg/portallocator/portallocator_test.go b/libnetwork/portallocator/portallocator_test.go similarity index 100% rename from libnetwork/pkg/portallocator/portallocator_test.go rename to libnetwork/portallocator/portallocator_test.go diff --git a/libnetwork/portmapper/mapper.go b/libnetwork/portmapper/mapper.go index e4532ae7c2..0dc0165d3b 100644 --- a/libnetwork/portmapper/mapper.go +++ b/libnetwork/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/libnetwork/portmapper/mapper_test.go b/libnetwork/portmapper/mapper_test.go index 6f304dad7b..ac6cf72f19 100644 --- a/libnetwork/portmapper/mapper_test.go +++ b/libnetwork/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/libnetwork/pkg/resolvconf/README.md b/libnetwork/resolvconf/README.md similarity index 100% rename from libnetwork/pkg/resolvconf/README.md rename to libnetwork/resolvconf/README.md diff --git a/libnetwork/pkg/resolvconf/dns/resolvconf.go b/libnetwork/resolvconf/dns/resolvconf.go similarity index 100% rename from libnetwork/pkg/resolvconf/dns/resolvconf.go rename to libnetwork/resolvconf/dns/resolvconf.go diff --git a/libnetwork/pkg/resolvconf/resolvconf.go b/libnetwork/resolvconf/resolvconf.go similarity index 99% rename from libnetwork/pkg/resolvconf/resolvconf.go rename to libnetwork/resolvconf/resolvconf.go index ae6c4e676d..ebe3b71aa4 100644 --- a/libnetwork/pkg/resolvconf/resolvconf.go +++ b/libnetwork/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/libnetwork/pkg/resolvconf/resolvconf_test.go b/libnetwork/resolvconf/resolvconf_test.go similarity index 100% rename from libnetwork/pkg/resolvconf/resolvconf_test.go rename to libnetwork/resolvconf/resolvconf_test.go