Skip to content

Commit 6ae234f

Browse files
committed
reformatted
1 parent be25f3a commit 6ae234f

File tree

11 files changed

+12
-17
lines changed

11 files changed

+12
-17
lines changed

bundler/bundler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
package bundler
66

77
import (
8+
"context"
89
"errors"
910
"slices"
1011
"strings"
1112
"sync"
1213

13-
"context"
1414
"github.com/pb33f/libopenapi"
1515
"github.com/pb33f/libopenapi/datamodel"
1616
v3 "github.com/pb33f/libopenapi/datamodel/high/v3"

bundler/bundler_composer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
package bundler
55

66
import (
7+
"context"
78
"strings"
89
"sync"
910

10-
"context"
1111
v3 "github.com/pb33f/libopenapi/datamodel/high/v3"
1212
v3low "github.com/pb33f/libopenapi/datamodel/low/v3"
1313
"github.com/pb33f/libopenapi/index"

bundler/bundler_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import (
88
"crypto/sha256"
99
"errors"
1010
"fmt"
11-
"github.com/pb33f/libopenapi/datamodel/low"
1211
"log"
1312
"log/slog"
1413
"net/http"
@@ -21,6 +20,8 @@ import (
2120
"strings"
2221
"testing"
2322

23+
"github.com/pb33f/libopenapi/datamodel/low"
24+
2425
"github.com/pb33f/libopenapi"
2526
"github.com/pb33f/libopenapi/datamodel"
2627
"github.com/pb33f/libopenapi/utils"

bundler/composer_functions_test.go

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
package bundler
55

66
import (
7+
"testing"
8+
79
"github.com/pb33f/libopenapi"
810
"github.com/pb33f/libopenapi/index"
911
"github.com/stretchr/testify/assert"
10-
"testing"
1112
)
1213

1314
func TestProcessRef_UnknownLocation(t *testing.T) {
14-
1515
// create an empty doc
1616
doc, _ := libopenapi.NewDocument([]byte("openapi: 3.1.1"))
1717
m, _ := doc.BuildV3Model()
@@ -37,11 +37,9 @@ func TestProcessRef_UnknownLocation(t *testing.T) {
3737

3838
assert.NoError(t, err)
3939
assert.Len(t, config.inlineRequired, 1)
40-
4140
}
4241

4342
func TestProcessRef_UnknownLocation_TwoStep(t *testing.T) {
44-
4543
// create an empty doc
4644
doc, _ := libopenapi.NewDocument([]byte("openapi: 3.1.1"))
4745
m, _ := doc.BuildV3Model()
@@ -67,11 +65,9 @@ func TestProcessRef_UnknownLocation_TwoStep(t *testing.T) {
6765

6866
assert.NoError(t, err)
6967
assert.Len(t, config.inlineRequired, 1)
70-
7168
}
7269

7370
func TestProcessRef_UnknownLocation_ThreeStep(t *testing.T) {
74-
7571
// create an empty doc
7672
doc, _ := libopenapi.NewDocument([]byte("openapi: 3.1.1"))
7773
m, _ := doc.BuildV3Model()
@@ -98,5 +94,4 @@ func TestProcessRef_UnknownLocation_ThreeStep(t *testing.T) {
9894

9995
assert.NoError(t, err)
10096
assert.Len(t, config.inlineRequired, 1)
101-
10297
}

index/extract_refs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
package index
55

66
import (
7+
"context"
78
"errors"
89
"fmt"
910
"net/url"
@@ -12,7 +13,6 @@ import (
1213
"slices"
1314
"strings"
1415

15-
"context"
1616
"github.com/pb33f/libopenapi/utils"
1717
"gopkg.in/yaml.v3"
1818
)

index/find_component.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
package index
55

66
import (
7+
"context"
78
"fmt"
89
"net/url"
910
"path/filepath"
1011
"strings"
1112

1213
jsonpathconfig "github.com/speakeasy-api/jsonpath/pkg/jsonpath/config"
1314

14-
"context"
1515
"github.com/pb33f/libopenapi/utils"
1616
"github.com/speakeasy-api/jsonpath/pkg/jsonpath"
1717
"gopkg.in/yaml.v3"

index/search_index.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,6 @@ func (index *SpecIndex) SearchIndexForReferenceByReferenceWithContext(ctx contex
163163

164164
// if the reference starts with ../, then we need to create an absolute path from the current path context.
165165
if strings.HasPrefix(ref, "../") {
166-
167166
// check if there is a current path in the context and then create an absolute path from it.
168167
if currentPath, ok := ctx.Value(CurrentPathKey).(string); ok {
169168
refParsed = filepath.Join(filepath.Dir(currentPath), ref)

index/spec_index.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
package index
1414

1515
import (
16+
"context"
1617
"fmt"
1718
"log/slog"
1819
"os"
@@ -26,7 +27,6 @@ import (
2627

2728
"github.com/pb33f/libopenapi/utils"
2829

29-
"context"
3030
"gopkg.in/yaml.v3"
3131
)
3232

index/spec_index_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ package index
55

66
import (
77
"bytes"
8+
"context"
89
"fmt"
910
"log"
1011
"log/slog"
@@ -19,7 +20,6 @@ import (
1920
"testing"
2021
"time"
2122

22-
"context"
2323
"github.com/pb33f/libopenapi/utils"
2424
"github.com/stretchr/testify/assert"
2525
"gopkg.in/yaml.v3"

index/utility_methods.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
package index
55

66
import (
7+
"context"
78
"crypto/sha256"
89
"fmt"
910
"hash"
@@ -14,7 +15,6 @@ import (
1415
"strings"
1516
"sync"
1617

17-
"context"
1818
"github.com/pb33f/libopenapi/utils"
1919
"gopkg.in/yaml.v3"
2020
)

0 commit comments

Comments
 (0)