Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependencies #45

Merged
merged 4 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
go-version: 1.23

- name: Test
run: go test -v ./...
16 changes: 9 additions & 7 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ package lua

import (
"bytes"
"crypto/md5"
"crypto/md5" // skipcq: GSC-G501
"encoding/hex"
"errors"
"io"
"io/ioutil"
"os"

"github.com/luraproject/lura/v2/config"
"github.com/luraproject/lura/v2/logging"
Expand All @@ -29,7 +29,7 @@ type SourceLoader interface {
Get(string) (string, bool)
}

func Parse(l logging.Logger, e config.ExtraConfig, namespace string) (Config, error) {
func Parse(l logging.Logger, e config.ExtraConfig, namespace string) (Config, error) { // skipcq: GO-R1005
res := Config{}
v, ok := e[namespace]
if !ok {
Expand All @@ -54,7 +54,7 @@ func Parse(l logging.Logger, e config.ExtraConfig, namespace string) (Config, er

sources, ok := c["sources"].([]interface{})
if ok {
s := []string{}
s := make([]string, 0, len(sources))
for _, source := range sources {
if t, ok := source.(string); ok {
s = append(s, t)
Expand All @@ -71,7 +71,7 @@ func Parse(l logging.Logger, e config.ExtraConfig, namespace string) (Config, er
loader := map[string]string{}

for _, source := range res.Sources {
b, err := ioutil.ReadFile(source)
b, err := os.ReadFile(source)
if err != nil {
l.Error("[Lua] Opening the source file:", err.Error())
continue
Expand All @@ -80,7 +80,9 @@ func Parse(l logging.Logger, e config.ExtraConfig, namespace string) (Config, er
}
res.SourceLoader = onceLoader(loader)

checksums, ok := c["md5"].(map[string]interface{})
// TODO: at some point we might want to change the hashing
// function, but we need to do it in a backards compat mode:
checksums, ok := c["md5"].(map[string]interface{}) // skipcq: GO-S1023, GSC-G401
if !ok {
return res, nil
}
Expand Down Expand Up @@ -118,7 +120,7 @@ func (o onceLoader) Get(k string) (string, bool) {
type liveLoader struct{}

func (liveLoader) Get(k string) (string, bool) {
b, err := ioutil.ReadFile(k)
b, err := os.ReadFile(k)
if err != nil {
return "", false
}
Expand Down
40 changes: 25 additions & 15 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,36 +1,46 @@
module github.com/krakendio/krakend-lua/v2

go 1.17
go 1.19

require (
github.com/gin-gonic/gin v1.7.7
github.com/gin-gonic/gin v1.9.1
github.com/krakendio/binder v0.0.0-20230413105421-1bbe94e65f45
github.com/luraproject/lura/v2 v2.0.5
github.com/luraproject/lura/v2 v2.7.0
github.com/yuin/gopher-lua v0.0.0-20190206043414-8bfc7677f583
)

require (
github.com/alecthomas/chroma v0.6.3 // indirect
github.com/bytedance/sonic v1.11.6 // indirect
github.com/bytedance/sonic/loader v0.1.1 // indirect
github.com/cloudwego/base64x v0.1.4 // indirect
github.com/cloudwego/iasm v0.2.0 // indirect
github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964 // indirect
github.com/dlclark/regexp2 v1.1.6 // indirect
github.com/fatih/color v1.7.0 // indirect
github.com/gabriel-vasile/mimetype v1.4.3 // indirect
github.com/gin-contrib/sse v0.1.0 // indirect
github.com/go-playground/locales v0.14.0 // indirect
github.com/go-playground/universal-translator v0.18.0 // indirect
github.com/go-playground/validator/v10 v10.9.0 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/go-playground/validator/v10 v10.20.0 // indirect
github.com/goccy/go-json v0.10.2 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/cpuid/v2 v2.2.7 // indirect
github.com/krakendio/flatmap v1.1.1 // indirect
github.com/leodido/go-urn v1.2.1 // indirect
github.com/leodido/go-urn v1.4.0 // indirect
github.com/mattn/go-colorable v0.0.9 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/ugorji/go/codec v1.2.6 // indirect
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
github.com/ugorji/go/codec v1.2.12 // indirect
github.com/valyala/fastrand v1.1.0 // indirect
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 // indirect
golang.org/x/sys v0.0.0-20211004093028-2c5d950f24ef // indirect
golang.org/x/text v0.3.7 // indirect
google.golang.org/protobuf v1.27.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
golang.org/x/arch v0.8.0 // indirect
golang.org/x/crypto v0.26.0 // indirect
golang.org/x/net v0.25.0 // indirect
golang.org/x/sys v0.24.0 // indirect
golang.org/x/text v0.17.0 // indirect
google.golang.org/protobuf v1.34.2 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading
Loading