packagecommandsimport("testing")funcTestCommandTree(t*testing.T){printErrors:=func(errsmap[string][]error){iferrs==nil{return}t.Error("In Root command tree:")forcmd,err:=rangeerrs{t.Errorf(" In X command %s:",cmd)for_,e:=rangeerr{t.Errorf(" %s",e)}}}printErrors(Root.DebugValidate())printErrors(RootRO.DebugValidate())}