From 762148deb6be6925d17bd12f219f7385e1402439 Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Mon, 15 Mar 2021 10:45:24 +0100 Subject: Split libpod/network package The `libpod/network` package should only be used on the backend and not the client. The client used this package only for two functions so move them into a new `pkg/network` package. This is needed so we can put linux only code into `libpod/network`, see #9710. [NO TESTS NEEDED] Signed-off-by: Paul Holzinger --- libpod/network/network.go | 9 --------- 1 file changed, 9 deletions(-) (limited to 'libpod/network/network.go') diff --git a/libpod/network/network.go b/libpod/network/network.go index f19a764ef..ed4e6388a 100644 --- a/libpod/network/network.go +++ b/libpod/network/network.go @@ -1,8 +1,6 @@ package network import ( - "crypto/sha256" - "encoding/hex" "encoding/json" "net" "os" @@ -245,13 +243,6 @@ func Exists(config *config.Config, name string) (bool, error) { return true, nil } -// GetNetworkID return the network ID for a given name. -// It is just the sha256 hash but this should be good enough. -func GetNetworkID(name string) string { - hash := sha256.Sum256([]byte(name)) - return hex.EncodeToString(hash[:]) -} - // PruneNetworks removes networks that are not being used and that is not the default // network. To keep proper fencing for imports, you must provide the used networks // to this function as a map. the key is meaningful in the map, the book is a no-op -- cgit v1.2.3-54-g00ecf