1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-30 03:23:08 +03:00
This commit is contained in:
Jesse Duffield
2022-08-12 09:24:39 +10:00
parent b8d9443999
commit faed509bfd
6 changed files with 10 additions and 32 deletions

View File

@ -2,7 +2,6 @@ package custom_commands
import (
"bytes"
"fmt"
"text/template"
"github.com/jesseduffield/lazygit/pkg/common"
@ -106,13 +105,6 @@ func (self *Resolver) resolveMenuOption(option *config.CustomCommandMenuOption,
}, nil
}
func main() {
fmt.Println(ResolveTemplate("old approach: {{index .PromptResponses 0}}, new approach: {{ .Form.a }}", CustomCommandObject{
PromptResponses: []string{"a"},
Form: map[string]string{"a": "B"},
}))
}
type CustomCommandObject struct {
// deprecated. Use Responses instead
PromptResponses []string