本文整理匯總了Golang中github.com/richardlehane/siegfried/pkg/core/persist.LoadSaver.LoadString方法的典型用法代碼示例。如果您正苦於以下問題:Golang LoadSaver.LoadString方法的具體用法?Golang LoadSaver.LoadString怎麽用?Golang LoadSaver.LoadString使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類github.com/richardlehane/siegfried/pkg/core/persist.LoadSaver
的用法示例。
在下文中一共展示了LoadSaver.LoadString方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: Load
func Load(ls *persist.LoadSaver) core.Identifier {
i := &Identifier{}
i.name = ls.LoadString()
i.details = ls.LoadString()
i.noPriority = ls.LoadBool()
i.zipDefault = ls.LoadBool()
i.infos = make(map[string]formatInfo)
le := ls.LoadSmallInt()
for j := 0; j < le; j++ {
i.infos[ls.LoadString()] = formatInfo{
ls.LoadString(),
ls.LoadString(),
ls.LoadString(),
}
}
i.eStart = ls.LoadInt()
i.ePuids = ls.LoadStrings()
i.mStart = ls.LoadInt()
i.mPuids = ls.LoadStrings()
i.cStart = ls.LoadInt()
i.cPuids = ls.LoadStrings()
i.bStart = ls.LoadInt()
i.bPuids = ls.LoadStrings()
i.tStart = ls.LoadSmallInt()
return i
}
示例2: loadCM
func loadCM(ls *persist.LoadSaver) *ContainerMatcher {
return &ContainerMatcher{
startIndexes: ls.LoadInts(),
conType: containerType(ls.LoadTinyUInt()),
nameCTest: loadCTests(ls),
parts: ls.LoadInts(),
priorities: priority.Load(ls),
extension: ls.LoadString(),
}
}
示例3: loadCTests
func loadCTests(ls *persist.LoadSaver) map[string]*cTest {
ret := make(map[string]*cTest)
l := ls.LoadSmallInt()
for i := 0; i < l; i++ {
ret[ls.LoadString()] = &cTest{
satisfied: ls.LoadInts(),
unsatisfied: ls.LoadInts(),
bm: bytematcher.Load(ls),
}
}
return ret
}
示例4: Load
func Load(ls *persist.LoadSaver) Matcher {
le := ls.LoadSmallInt()
if le == 0 {
return nil
}
ret := make(Matcher)
for i := 0; i < le; i++ {
k := ls.LoadString()
r := make([]result, ls.LoadSmallInt())
for j := range r {
r[j] = result(ls.LoadSmallInt())
}
ret[k] = r
}
return ret
}