()
| 33 | } |
| 34 | |
| 35 | func (this *MemoryList) Init() error { |
| 36 | this.prefixes = []string{"000"} |
| 37 | for i := 100; i <= 999; i++ { |
| 38 | this.prefixes = append(this.prefixes, strconv.Itoa(i)) |
| 39 | } |
| 40 | |
| 41 | for _, prefix := range this.prefixes { |
| 42 | this.itemMaps[prefix] = map[string]*Item{} |
| 43 | } |
| 44 | |
| 45 | return nil |
| 46 | } |
| 47 | |
| 48 | func (this *MemoryList) Reset() error { |
| 49 | this.locker.Lock() |
no outgoing calls