packagemainimport("log""github.com/lafikl/consistent")funcmain(){c:=consistent.New()// adds the hosts to the ringc.Add("127.0.0.1:8000")c.Add("92.0.0.1:8000")// Returns the host that owns `key`.//// As described in https://en.wikipedia.org/wiki/Consistent_hashing//// It returns ErrNoHosts if the ring has no hosts in it.host,err:=c.Get("/app.html")iferr!=nil{log.Fatal(err)}log.Println(host)}