package catalogue // Chosen is the provider somebody named for a provision: the module, and the node it runs on. Both, // always (novox/hq #258) — a provision comes from a module, and the same module on two machines is // two answers, so neither half alone says which. Module is empty only on a record made before this // was asked, and such a record is honoured exactly as long as it is unambiguous. type Chosen struct { Node string Module string } func (c Chosen) String() string { if c.Module == "" { return c.Node } return c.Node + "/" + c.Module } func oneOf(list []string, s string) bool { for _, x := range list { if x == s { return true } } return false }