package main import ( "math/rand" "time" ) func getRandomMember(team []string, except string) string { rand.Seed(time.Now().Unix()) found := false member := "" for !found { n := rand.Int() % len(team) member = team[n] found = member != except } return member }