Skip to content

Commit

Permalink
Merge pull request #9 from ory/context
Browse files Browse the repository at this point in the history
feat: use context in HTTP loader
  • Loading branch information
alnr authored Apr 4, 2023
2 parents b41762f + 9d5eb0d commit d248f49
Show file tree
Hide file tree
Showing 7 changed files with 375 additions and 289 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '^1.16.0'
go-version: '^1.19.0'
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
- run: make tools
Expand Down
5 changes: 2 additions & 3 deletions base64loader/base64loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
// registering its Loaders.
//
// To use base64loader, link this package into your program:
// import _ "github.com/ory/jsonschema/v3/base64loader"
//
// import _ "github.com/ory/jsonschema/v3/base64loader"
package base64loader

import (
Expand All @@ -14,7 +14,6 @@ import (
"encoding/base64"
"fmt"
"io"
"io/ioutil"
"strings"

"github.com/ory/jsonschema/v3"
Expand All @@ -31,7 +30,7 @@ func Load(ctx context.Context, url string) (_ io.ReadCloser, err error) {
return nil, fmt.Errorf("unable to decode std encoded base64 string: %s", err)
}

return ioutil.NopCloser(bytes.NewBuffer(raw)), nil
return io.NopCloser(bytes.NewBuffer(raw)), nil
}

func init() {
Expand Down
62 changes: 34 additions & 28 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,34 +1,40 @@
module github.com/ory/jsonschema/v3

go 1.16
go 1.19

replace github.com/oleiade/reflections => github.com/oleiade/reflections v1.0.1
require (
github.com/hashicorp/go-retryablehttp v0.7.2
github.com/jandelgado/gcov2lcov v1.0.5
github.com/nyaruka/phonenumbers v1.1.6
github.com/ory/go-acc v0.2.9-0.20230103102148-6b1c9a70dbbe
github.com/stretchr/testify v1.8.1
golang.org/x/tools v0.7.0
)

require (
github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869
github.com/dgraph-io/ristretto v0.0.3 // indirect
github.com/golang/protobuf v1.4.3 // indirect
github.com/google/go-cmp v0.5.5 // indirect
github.com/google/uuid v1.2.0 // indirect
github.com/hashicorp/go-retryablehttp v0.6.8
github.com/jandelgado/gcov2lcov v1.0.4
github.com/kr/text v0.2.0 // indirect
github.com/magiconair/properties v1.8.4 // indirect
github.com/mitchellh/mapstructure v1.4.1 // indirect
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
github.com/nyaruka/phonenumbers v1.0.73
github.com/ory/go-acc v0.2.6
github.com/pborman/uuid v1.2.1 // indirect
github.com/pelletier/go-toml v1.8.1 // indirect
github.com/spf13/afero v1.5.1 // indirect
github.com/spf13/cast v1.3.2-0.20200723214538-8d17101741c8 // indirect
github.com/spf13/cobra v1.1.3 // indirect
github.com/stretchr/testify v1.7.0
golang.org/x/mod v0.4.2 // indirect
golang.org/x/sys v0.0.0-20210309074719-68d13333faf2 // indirect
golang.org/x/tools v0.1.0
google.golang.org/protobuf v1.25.0 // indirect
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect
gopkg.in/ini.v1 v1.62.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pelletier/go-toml/v2 v2.0.6 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/spf13/afero v1.9.5 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/spf13/cobra v1.6.1 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/spf13/viper v1.14.0 // indirect
github.com/subosito/gotenv v1.4.2 // indirect
golang.org/x/mod v0.9.0 // indirect
golang.org/x/sys v0.6.0 // indirect
golang.org/x/text v0.5.0 // indirect
google.golang.org/protobuf v1.30.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading

0 comments on commit d248f49

Please sign in to comment.