Exemplo n.º 1
0
func (c *ContainerMatcher) save(ls *persist.LoadSaver) {
	ls.SaveInts(c.startIndexes)
	ls.SaveTinyUInt(int(c.conType))
	saveCTests(ls, c.nameCTest)
	ls.SaveInts(c.parts)
	c.priorities.Save(ls)
	ls.SaveString(c.extension)
}
Exemplo n.º 2
0
func Save(c core.Matcher, ls *persist.LoadSaver) {
	if c == nil {
		ls.SaveBool(false)
		return
	}
	m := c.(Matcher)
	if m.total(-1) == 0 {
		ls.SaveBool(false)
		return
	}
	ls.SaveBool(true)
	ls.SaveTinyUInt(len(m))
	for _, v := range m {
		v.save(ls)
	}
}