Skip to content

Commit

Permalink
fix format errors
Browse files Browse the repository at this point in the history
Signed-off-by: m-brophy <mbrophy@redhat.com>
  • Loading branch information
m-brophy committed Nov 9, 2023
1 parent bc5d46d commit 759a0b6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion pkg/handler/processor/process/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
14 changes: 6 additions & 8 deletions pkg/handler/processor/process/process_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}{
{
Expand All @@ -620,7 +618,7 @@ func Test_guessEncoding(t *testing.T) {
Source: "a-source",
},
},
wantErr: false,
wantErr: false,
wantMimeType: "application/x-bzip2",
},
{
Expand All @@ -634,7 +632,7 @@ func Test_guessEncoding(t *testing.T) {
Source: "a-source",
},
},
wantErr: false,
wantErr: false,
wantMimeType: "application/zstd",
},
}
Expand All @@ -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)
}
})
Expand Down

0 comments on commit 759a0b6

Please sign in to comment.