INNER CODE UNIT · Go
func
rwynn/gtm · gtm.go:374
func (n *N) parse(ns string) (err error) {
parts := strings.SplitN(ns, ".", 2)
if len(parts) != 2 {
err = fmt.Errorf("Invalid ns: %s :expecting db.collection", ns)
} else {
n.database = parts[0]
n.collection = parts[1]
}
return
}
func (n *N) parseForChanges(ns string) {
if ns == "" {
// watch the whole deployment
n.database = ""
n.collection = ""
return
}