本文整理匯總了Golang中github.com/richardlehane/siegfried/internal/persist.LoadSaver.SaveString方法的典型用法代碼示例。如果您正苦於以下問題:Golang LoadSaver.SaveString方法的具體用法?Golang LoadSaver.SaveString怎麽用?Golang LoadSaver.SaveString使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類github.com/richardlehane/siegfried/internal/persist.LoadSaver
的用法示例。
在下文中一共展示了LoadSaver.SaveString方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: save
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)
}
示例2: saveCTests
func saveCTests(ls *persist.LoadSaver, ct map[string]*cTest) {
ls.SaveSmallInt(len(ct))
for k, v := range ct {
ls.SaveString(k)
ls.SaveInts(v.satisfied)
ls.SaveInts(v.unsatisfied)
bytematcher.Save(v.bm, ls)
}
}
示例3: Save
func (i *Identifier) Save(ls *persist.LoadSaver) {
ls.SaveByte(core.MIMEInfo)
ls.SaveSmallInt(len(i.infos))
for k, v := range i.infos {
ls.SaveString(k)
ls.SaveString(v.comment)
ls.SaveBool(v.text)
ls.SaveInts(v.globWeights)
ls.SaveInts(v.magicWeights)
}
i.Base.Save(ls)
}
示例4: Save
func (b *Base) Save(ls *persist.LoadSaver) {
ls.SaveString(b.name)
ls.SaveString(b.details)
ls.SaveTinyInt(int(b.multi))
ls.SaveBool(b.zipDefault)
b.gids.save(ls)
b.mids.save(ls)
b.cids.save(ls)
b.xids.save(ls)
b.bids.save(ls)
b.rids.save(ls)
b.tids.save(ls)
}
示例5: Save
func Save(c core.Matcher, ls *persist.LoadSaver) {
if c == nil {
ls.SaveSmallInt(0)
return
}
m := c.(Matcher)
ls.SaveSmallInt(len(m))
for k, v := range m {
ls.SaveString(k)
ls.SaveSmallInt(len(v))
for _, w := range v {
ls.SaveSmallInt(w)
}
}
}
示例6: Save
func Save(c core.Matcher, ls *persist.LoadSaver) {
if c == nil {
ls.SaveBool(false)
return
}
m := c.(*Matcher)
ls.SaveBool(true)
ls.SaveSmallInt(len(m.extensions))
for k, v := range m.extensions {
ls.SaveString(k)
ls.SaveSmallInt(len(v))
for _, w := range v {
ls.SaveSmallInt(int(w))
}
}
ls.SaveStrings(m.globs)
ls.SaveSmallInt(len(m.globIdx))
for _, v := range m.globIdx {
ls.SaveInts(v)
}
}