Skip to content

Commit 76395eb

Browse files
committed
fixed linting
1 parent c1bd7d1 commit 76395eb

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

helpers/path_finder.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,15 @@ package helpers
55

66
import (
77
"fmt"
8-
"github.com/santhosh-tekuri/jsonschema/v6"
98
"strings"
109
"unicode"
10+
11+
"github.com/santhosh-tekuri/jsonschema/v6"
1112
)
1213

1314
// ExtractJSONPathFromValidationError traverses and processes a ValidationError to construct a JSONPath string representation of its instance location.
1415
func ExtractJSONPathFromValidationError(e *jsonschema.ValidationError) string {
15-
if e.Causes != nil && len(e.Causes) > 0 {
16+
if len(e.Causes) > 0 {
1617
for _, cause := range e.Causes {
1718
ExtractJSONPathFromValidationError(cause)
1819
}

helpers/path_finder_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44
package helpers
55

66
import (
7+
"testing"
8+
79
"github.com/santhosh-tekuri/jsonschema/v6"
810
"github.com/stretchr/testify/assert"
9-
"testing"
1011
)
1112

1213
func TestDiveIntoValidationError(t *testing.T) {

0 commit comments

Comments
 (0)