terraform-provider-gitea/vendor/github.com/Masterminds/sprig/network.go
Malar Invention 00ebcd295e add vendor
2022-04-03 09:37:16 +05:30

13 lines
214 B
Go

package sprig
import (
"math/rand"
"net"
)
func getHostByName(name string) string {
addrs, _ := net.LookupHost(name)
//TODO: add error handing when release v3 cames out
return addrs[rand.Intn(len(addrs))]
}