From 759a0b6d84ea4580b62f6046a77a30db1541d63e Mon Sep 17 00:00:00 2001 From: m-brophy Date: Tue, 7 Nov 2023 16:38:49 +0000 Subject: [PATCH] fix format errors Signed-off-by: m-brophy --- pkg/handler/processor/process/process.go | 2 +- pkg/handler/processor/process/process_test.go | 14 ++++++-------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/pkg/handler/processor/process/process.go b/pkg/handler/processor/process/process.go index e0d69ff1c8b..95ce092cca2 100644 --- a/pkg/handler/processor/process/process.go +++ b/pkg/handler/processor/process/process.go @@ -23,9 +23,9 @@ import ( "encoding/xml" "fmt" "io" + "net/http" "path/filepath" "strings" - "net/http" uuid "github.com/gofrs/uuid" "github.com/guacsec/guac/pkg/emitter" diff --git a/pkg/handler/processor/process/process_test.go b/pkg/handler/processor/process/process_test.go index cb582510ed2..8bf242ef3c6 100644 --- a/pkg/handler/processor/process/process_test.go +++ b/pkg/handler/processor/process/process_test.go @@ -600,13 +600,11 @@ func Test_validateFormat(t *testing.T) { } } - - func Test_guessEncoding(t *testing.T) { tests := []struct { - name string - doc processor.Document - wantErr bool + name string + doc processor.Document + wantErr bool wantMimeType string }{ { @@ -620,7 +618,7 @@ func Test_guessEncoding(t *testing.T) { Source: "a-source", }, }, - wantErr: false, + wantErr: false, wantMimeType: "application/x-bzip2", }, { @@ -634,7 +632,7 @@ func Test_guessEncoding(t *testing.T) { Source: "a-source", }, }, - wantErr: false, + wantErr: false, wantMimeType: "application/zstd", }, } @@ -644,7 +642,7 @@ func Test_guessEncoding(t *testing.T) { if (err != nil) != tt.wantErr { t.Errorf("detectFileEncoding() error = %v, wantErr %v", err, tt.wantErr) } - if mimeType != tt.wantMimeType { + if mimeType != tt.wantMimeType { t.Errorf("detectFileEncoding() incorrect mimeType = %v", mimeType) } })