本文整理匯總了Golang中github.com/richardlehane/siegfried/pkg/core/persist.LoadSaver.LoadInts方法的典型用法代碼示例。如果您正苦於以下問題:Golang LoadSaver.LoadInts方法的具體用法?Golang LoadSaver.LoadInts怎麽用?Golang LoadSaver.LoadInts使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類github.com/richardlehane/siegfried/pkg/core/persist.LoadSaver
的用法示例。
在下文中一共展示了LoadSaver.LoadInts方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: 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(),
}
}
示例2: 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
}
示例3: loadFrameSet
func loadFrameSet(ls *persist.LoadSaver) *frameSet {
ret := &frameSet{}
le := ls.LoadSmallInt()
if le == 0 {
_ = ls.LoadInts()
return ret
}
ret.set = make([]frames.Frame, le)
for i := range ret.set {
ret.set[i] = frames.Load(ls)
}
ret.testTreeIndex = ls.LoadInts()
return ret
}
示例4: loadTestNodes
func loadTestNodes(ls *persist.LoadSaver) []*testNode {
l := ls.LoadSmallInt()
if l == 0 {
return nil
}
ret := make([]*testNode, l)
for i := range ret {
ret[i] = &testNode{
frames.Load(ls),
ls.LoadInts(),
loadTestNodes(ls),
}
}
return ret
}
示例5: Load
func Load(ls *persist.LoadSaver) *Set {
set := &Set{}
set.Idx = ls.LoadInts()
if set.Idx == nil {
_ = ls.LoadSmallInt() // discard the empty list too
return set
}
set.Lists = make([]List, ls.LoadSmallInt())
for i := range set.Lists {
le := ls.LoadSmallInt()
if le == 0 {
continue
}
set.Lists[i] = make(List, le)
for j := range set.Lists[i] {
set.Lists[i][j] = ls.LoadInts()
}
}
return set
}
示例6: loadSeqSet
func loadSeqSet(ls *persist.LoadSaver) *seqSet {
ret := &seqSet{}
le := ls.LoadSmallInt()
if le == 0 {
_ = ls.LoadInts() // discard the empty testtreeindex list too
return ret
}
ret.set = make([]wac.Seq, le)
for i := range ret.set {
ret.set[i].MaxOffsets = ls.LoadBigInts()
ret.set[i].Choices = make([]wac.Choice, ls.LoadSmallInt())
for j := range ret.set[i].Choices {
ret.set[i].Choices[j] = make(wac.Choice, ls.LoadSmallInt())
for k := range ret.set[i].Choices[j] {
ret.set[i].Choices[j][k] = ls.LoadBytes()
}
}
}
ret.testTreeIndex = ls.LoadInts()
return ret
}