pkg/jsonmessage: format code with gofumpt

Formatting the code with https://github.com/mvdan/gofumpt

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2022-01-20 14:17:59 +01:00
parent 1291bbfa50
commit 651086d1d9
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C

View file

@ -34,7 +34,7 @@ func TestProgressString(t *testing.T) {
}
}
var testcases = []struct {
testcases := []struct {
name string
progress JSONProgress
expected expected
@ -220,9 +220,7 @@ func TestJSONMessageDisplayWithJSONError(t *testing.T) {
}
func TestDisplayJSONMessagesStreamInvalidJSON(t *testing.T) {
var (
inFd uintptr
)
var inFd uintptr
data := bytes.NewBuffer([]byte{})
reader := strings.NewReader("This is not a 'valid' JSON []")
inFd, _ = term.GetFdInfo(reader)
@ -234,15 +232,14 @@ func TestDisplayJSONMessagesStreamInvalidJSON(t *testing.T) {
}
func TestDisplayJSONMessagesStream(t *testing.T) {
var (
inFd uintptr
)
var inFd uintptr
messages := map[string][]string{
// empty string
"": {
"",
""},
"",
},
// Without progress & ID
"{ \"status\": \"status\" }": {
"status\n",