diff options
Diffstat (limited to 'vendor/github.com/go-task/slim-sprig/network.go')
-rw-r--r-- | vendor/github.com/go-task/slim-sprig/network.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/vendor/github.com/go-task/slim-sprig/network.go b/vendor/github.com/go-task/slim-sprig/network.go new file mode 100644 index 000000000..108d78a94 --- /dev/null +++ b/vendor/github.com/go-task/slim-sprig/network.go @@ -0,0 +1,12 @@ +package sprig + +import ( + "math/rand" + "net" +) + +func getHostByName(name string) string { + addrs, _ := net.LookupHost(name) + //TODO: add error handing when release v3 comes out + return addrs[rand.Intn(len(addrs))] +} |