Add a debug function to print to parent kitty stdout

This commit is contained in:
Kovid Goyal 2022-09-19 17:07:53 +05:30
parent 266e51310c
commit a7c997c6ef
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -11,9 +11,18 @@ import (
"github.com/spf13/cobra"
"kitty/tools/cli"
"kitty/tools/tty"
"kitty/tools/utils"
)
func debug(args ...interface{}) {
tty.DebugPrintln(args...)
}
func debugf(format string, args ...interface{}) {
debug(fmt.Sprintf(format, args...))
}
func json_input_parser(data []byte, shell_state map[string]string) ([][]string, error) {
ans := make([][]string, 0, 32)
err := json.Unmarshal(data, &ans)