(format string, a ...any)
| 12 | } |
| 13 | |
| 14 | func (n *Notes) Add(format string, a ...any) { |
| 15 | n.mu.Lock() |
| 16 | defer n.mu.Unlock() |
| 17 | |
| 18 | n.items = append(n.items, fmt.Sprintf(format, a...)) |
| 19 | } |
| 20 | |
| 21 | func (n *Notes) AddCommand(command string, exitCode int, stdout, stderr string) { |
| 22 | msg := fmt.Sprintf("$ %s", strings.TrimSpace(command)) |