()
| 518 | } |
| 519 | |
| 520 | func (m actionMap) GobEncode() ([]byte, error) { |
| 521 | entries := make([]actionsMapEntry, 0, len(m)) |
| 522 | for k, v := range m { |
| 523 | entries = append(entries, actionsMapEntry{k, v}) |
| 524 | } |
| 525 | sort.Slice(entries, func(i, j int) bool { |
| 526 | return entries[i].K < entries[j].K |
| 527 | }) |
| 528 | var buf bytes.Buffer |
| 529 | err := gob.NewEncoder(&buf).Encode(entries) |
| 530 | return buf.Bytes(), err |
| 531 | } |
| 532 | |
| 533 | func (m *actionMap) GobDecode(data []byte) error { |
| 534 | var entries []actionsMapEntry |
nothing calls this directly
no test coverage detected