An Instruction is a command to be run by lazygit in daemon mode. It is serialized to json and passed to lazygit via environment variables
| 103 | // An Instruction is a command to be run by lazygit in daemon mode. |
| 104 | // It is serialized to json and passed to lazygit via environment variables |
| 105 | type Instruction interface { |
| 106 | Kind() DaemonKind |
| 107 | SerializedInstructions() string |
| 108 | |
| 109 | // runs the instruction |
| 110 | run(common *common.Common) error |
| 111 | } |
| 112 | |
| 113 | func serializeInstruction[T any](instruction T) string { |
| 114 | jsonData, err := json.Marshal(instruction) |
no outgoing calls
no test coverage detected