(args []string)
| 87 | } |
| 88 | |
| 89 | func (cs *CommandStubber) find(args []string) *commandStub { |
| 90 | line := strings.Join(args, " ") |
| 91 | for _, s := range cs.stubs { |
| 92 | if !s.matched && s.pattern.MatchString(line) { |
| 93 | return s |
| 94 | } |
| 95 | } |
| 96 | return nil |
| 97 | } |
| 98 | |
| 99 | type CommandCallback func([]string) |
| 100 |