1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-30 03:23:08 +03:00

making a start on unidirectional data binding to fix these UI bugs

This commit is contained in:
Jesse Duffield
2018-12-04 19:50:11 +11:00
parent ccc771d8b1
commit 99a8b1ae8b
12 changed files with 333 additions and 160 deletions

View File

@ -1,6 +1,7 @@
package utils
import (
"encoding/json"
"errors"
"fmt"
"log"
@ -235,3 +236,8 @@ func PrevIndex(numbers []int, currentNumber int) int {
}
return end
}
func AsJson(i interface{}) string {
bytes, _ := json.MarshalIndent(i, "", " ")
return string(bytes)
}