Define creates a record of a new method
(cmd, dataType string)
| 41 | |
| 42 | // Define creates a record of a new method |
| 43 | func (m *methods) Define(cmd, dataType string) { |
| 44 | m.mutex.Lock() |
| 45 | |
| 46 | cmds := m.dt[dataType] |
| 47 | |
| 48 | if m.exists(cmd, dataType) != -1 { |
| 49 | m.mutex.Unlock() |
| 50 | debug.Log("method define", cmd, dataType, "exists") |
| 51 | return |
| 52 | } |
| 53 | |
| 54 | m.dt[dataType] = append(cmds, cmd) |
| 55 | m.mutex.Unlock() |
| 56 | } |
| 57 | |
| 58 | // Degroup takes the commands assigned to group types and sorts them back into individual types |
| 59 | func (m *methods) Degroup() error { |