Skip to content

Commit

Permalink
Upgrade dependencies and fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergio Andres Virviescas Santana committed Jan 9, 2021
1 parent e21a544 commit 7c87a2e
Show file tree
Hide file tree
Showing 20 changed files with 90 additions and 93 deletions.
15 changes: 7 additions & 8 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@ module github.com/savsgio/kratgo
go 1.12

require (
github.com/allegro/bigcache/v2 v2.2.4
github.com/philhofer/fwd v1.0.0 // indirect
github.com/savsgio/atreugo/v11 v11.5.3
github.com/savsgio/go-logger/v2 v2.0.1
github.com/savsgio/gotils v0.0.0-20200909101946-939aa3fc74fb
github.com/allegro/bigcache/v2 v2.2.5
github.com/savsgio/atreugo/v11 v11.6.0
github.com/savsgio/go-logger/v2 v2.1.0
github.com/savsgio/gotils v0.0.0-20210105085219-0567298fdcac
github.com/savsgio/govaluate/v3 v3.0.0
github.com/tinylib/msgp v1.1.2
github.com/valyala/fasthttp v1.16.0
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776
github.com/tinylib/msgp v1.1.5
github.com/valyala/fasthttp v1.19.0
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b
)
62 changes: 39 additions & 23 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,40 +1,56 @@
github.com/allegro/bigcache/v2 v2.2.4 h1:KuqdWxz12ywtykdsk+SlTKu6TW0ADLGwtisGN+JfKYw=
github.com/allegro/bigcache/v2 v2.2.4/go.mod h1:FppZsIO+IZk7gCuj5FiIDHGygD9xvWQcqg1uIPMb6tY=
github.com/allegro/bigcache/v2 v2.2.5 h1:mRc8r6GQjuJsmSKQNPsR5jQVXc8IJ1xsW5YXUYMLfqI=
github.com/allegro/bigcache/v2 v2.2.5/go.mod h1:FppZsIO+IZk7gCuj5FiIDHGygD9xvWQcqg1uIPMb6tY=
github.com/andybalholm/brotli v1.0.0 h1:7UCwP93aiSfvWpapti8g88vVVGp2qqtGyePsSuDafo4=
github.com/andybalholm/brotli v1.0.0/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y=
github.com/atreugo/mock v0.0.0-20200601091009-13c275b330b0 h1:IVqe9WnancrkICl5HqEfGjrnkQ4+VsU5fodcuFVoG/A=
github.com/atreugo/mock v0.0.0-20200601091009-13c275b330b0/go.mod h1:HTHAc8RoZXMVTr6wZQN7Jjm3mYMnbfkqqKdnQgSoe9o=
github.com/fasthttp/router v1.3.2 h1:n9r5QNuJi5z5Sp2vp/0SrawogTjGfYFqTOyP/R8ehNI=
github.com/fasthttp/router v1.3.2/go.mod h1:athTSKMdel0Qhh3W4nB8qn+EPYuyj6YZMUo6ZcXWTgc=
github.com/fasthttp/router v1.3.5 h1:XGZZtcYUH+9ZoLxKhwF66F8sGnMT+Jg00j0JdVzwmDA=
github.com/fasthttp/router v1.3.5/go.mod h1:BylQKgvh6YQkR0mvL60+HJyTaGwcn5d8UFNweOb/Nw8=
github.com/klauspost/compress v1.10.7 h1:7rix8v8GpI3ZBb0nSozFRgbtXKv+hOe+qfEpZqybrAg=
github.com/klauspost/compress v1.10.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs=
github.com/philhofer/fwd v1.0.0 h1:UbZqGr5Y38ApvM/V/jEljVxwocdweyH+vmYvRPBnbqQ=
github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU=
github.com/savsgio/atreugo/v11 v11.5.3 h1:Sc926b9GucRQQR/x6QBctSXNp+YyFkmEiZ1io1i46qU=
github.com/savsgio/atreugo/v11 v11.5.3/go.mod h1:FG9kRuaDpkMRS82vm9lav7Sgc6O1o2Ulwbh/WajNGs0=
github.com/savsgio/go-logger/v2 v2.0.1 h1:MgmsI5hnQFz0n5oX1Do/T9DldTo60guQTGwlRpzk0mk=
github.com/savsgio/go-logger/v2 v2.0.1/go.mod h1:fog+sZsg75Or4EENyd1jrS/Ps44s39hd6lccqALz0C8=
github.com/savsgio/gotils v0.0.0-20200616100644-13ff1fd2c28c/go.mod h1:TWNAOTaVzGOXq8RbEvHnhzA/A2sLZzgn0m6URjnukY8=
github.com/savsgio/gotils v0.0.0-20200909101946-939aa3fc74fb h1:XPJCVf85HPE2jMVEQ7QWrazaZo1lc94GbUWaQ8Yv5sM=
github.com/savsgio/gotils v0.0.0-20200909101946-939aa3fc74fb/go.mod h1:TWNAOTaVzGOXq8RbEvHnhzA/A2sLZzgn0m6URjnukY8=
github.com/philhofer/fwd v1.1.1 h1:GdGcTjf5RNAxwS4QLsiMzJYj5KEvPJD3Abr261yRQXQ=
github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU=
github.com/savsgio/atreugo/v11 v11.6.0 h1:q4Wi3KKRlXIcB9taPE8Ap7Yp9oUGNLggo9tZ0jKQh0k=
github.com/savsgio/atreugo/v11 v11.6.0/go.mod h1:mpYNJk8HNZBDsnoGD9WoqjZ3iCI+q2YKJoQwatMa8vc=
github.com/savsgio/go-logger/v2 v2.1.0 h1:aPvUruuyAU3FZD8MuxXlBchAjzUPxW0ZPP1jIjmfpDI=
github.com/savsgio/go-logger/v2 v2.1.0/go.mod h1:fog+sZsg75Or4EENyd1jrS/Ps44s39hd6lccqALz0C8=
github.com/savsgio/gotils v0.0.0-20210105085219-0567298fdcac h1:5pr1F6tcjeIKPKlrQZW6hzB0WxZge7SkkYVGG/e5pLY=
github.com/savsgio/gotils v0.0.0-20210105085219-0567298fdcac/go.mod h1:TWNAOTaVzGOXq8RbEvHnhzA/A2sLZzgn0m6URjnukY8=
github.com/savsgio/govaluate/v3 v3.0.0 h1:nilYfq6DyMQvy/++E42NW+s56k0I5jgqjm5IRtrwRfc=
github.com/savsgio/govaluate/v3 v3.0.0/go.mod h1:4hnQJKZBjiFt7RfuNjx5tmXs1yL6BhtP5j4OmZHm4C0=
github.com/tinylib/msgp v1.1.2 h1:gWmO7n0Ys2RBEb7GPYB9Ujq8Mk5p2U08lRnmMcGy6BQ=
github.com/tinylib/msgp v1.1.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE=
github.com/tinylib/msgp v1.1.5 h1:2gXmtWueD2HefZHQe1QOy9HVzmFrLOVvsXwXBQ0ayy0=
github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg=
github.com/ttacon/chalk v0.0.0-20160626202418-22c06c80ed31/go.mod h1:onvgF043R+lC5RZ8IT9rBXDaEDnpnw/Cl+HFiw+v/7Q=
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
github.com/valyala/fasthttp v1.16.0 h1:9zAqOYLl8Tuy3E5R6ckzGDJ1g8+pw15oQp2iL9Jl6gQ=
github.com/valyala/fasthttp v1.16.0/go.mod h1:YOKImeEosDdBPnxc0gy7INqi3m1zK6A+xl6TwOBhHCA=
github.com/valyala/fasthttp v1.19.0 h1:PfTS4PeH3xDr3WomrDS2ID8lU2GskK1xS3YG6gIpibU=
github.com/valyala/fasthttp v1.19.0/go.mod h1:jjraHZVbKOXftJfsOYoAjaeygpj5hr8ermTRJNroD7A=
github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a h1:0R4NLDRDZX6JcmhJgXi5E4b8Wg84ihbmUKp/GvSPEzc=
github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20201016165138-7b1cca2348c0/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980 h1:OjiUf46hAmXblsZdnoSXsEUSKU8r1UEzcL5RVZ4gO9Y=
golang.org/x/sys v0.0.0-20200602225109-6fdc65e7d980/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f h1:+Nyd8tzPX9R7BWHguqsrbFdRx3WQ/1ib8I44HXV5yTA=
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20201022035929-9cf592e881e9/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 h1:tQIYjPdBoyREyB9XMu+nnTclpTYkz2zFM+lzLJFO4gQ=
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo=
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
5 changes: 2 additions & 3 deletions modules/admin/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@ func New(cfg Config) (*Admin, error) {
log := logger.New(logName, cfg.LogLevel, cfg.LogOutput)

a.server = atreugo.New(atreugo.Config{
Addr: cfg.FileConfig.Addr,
LogName: logName,
Addr: cfg.FileConfig.Addr,
Logger: log,
})
a.server.SetLogOutput(cfg.LogOutput)

a.httpScheme = cfg.HTTPScheme
a.cache = cfg.Cache
Expand Down
5 changes: 2 additions & 3 deletions modules/admin/admin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@ import (
"testing"
"time"

"github.com/savsgio/atreugo/v11"
logger "github.com/savsgio/go-logger/v2"
"github.com/savsgio/kratgo/modules/cache"
"github.com/savsgio/kratgo/modules/config"
"github.com/savsgio/kratgo/modules/invalidator"

"github.com/savsgio/atreugo/v11"
logger "github.com/savsgio/go-logger/v2"
)

var testCache *cache.Cache
Expand Down
3 changes: 1 addition & 2 deletions modules/admin/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ package admin
import (
"encoding/json"

"github.com/savsgio/kratgo/modules/invalidator"

"github.com/savsgio/atreugo/v11"
"github.com/savsgio/kratgo/modules/invalidator"
)

func (a *Admin) invalidateView(ctx *atreugo.RequestCtx) error {
Expand Down
3 changes: 1 addition & 2 deletions modules/admin/http_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ package admin
import (
"testing"

"github.com/savsgio/kratgo/modules/invalidator"

"github.com/savsgio/atreugo/v11"
"github.com/savsgio/kratgo/modules/invalidator"
"github.com/valyala/fasthttp"
)

Expand Down
6 changes: 2 additions & 4 deletions modules/admin/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@ package admin
import (
"io"

"github.com/savsgio/atreugo/v11"
logger "github.com/savsgio/go-logger/v2"
"github.com/savsgio/kratgo/modules/cache"
"github.com/savsgio/kratgo/modules/config"
"github.com/savsgio/kratgo/modules/invalidator"

"github.com/savsgio/atreugo/v11"
logger "github.com/savsgio/go-logger/v2"
)

// Config ...
Expand Down Expand Up @@ -48,5 +47,4 @@ type Invalidator interface {
type Server interface {
ListenAndServe() error
Path(httpMethod string, url string, viewFn atreugo.View) *atreugo.Path
SetLogOutput(output io.Writer)
}
11 changes: 5 additions & 6 deletions modules/cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ import (
"fmt"
"time"

"github.com/savsgio/kratgo/modules/config"

"github.com/allegro/bigcache/v2"
logger "github.com/savsgio/go-logger/v2"
"github.com/savsgio/gotils"
"github.com/savsgio/gotils/strconv"
"github.com/savsgio/kratgo/modules/config"
)

func bigcacheConfig(cfg config.Cache) bigcache.Config {
Expand Down Expand Up @@ -52,7 +51,7 @@ func (c *Cache) Set(key string, entry Entry) error {

// SetBytes ...
func (c *Cache) SetBytes(key []byte, entry Entry) error {
return c.Set(gotils.B2S(key), entry)
return c.Set(strconv.B2S(key), entry)
}

// Get ...
Expand All @@ -69,7 +68,7 @@ func (c *Cache) Get(key string, dst *Entry) error {

// GetBytes ...
func (c *Cache) GetBytes(key []byte, dst *Entry) error {
return c.Get(gotils.B2S(key), dst)
return c.Get(strconv.B2S(key), dst)
}

// Del ...
Expand All @@ -79,7 +78,7 @@ func (c *Cache) Del(key string) error {

// DelBytes ...
func (c *Cache) DelBytes(key []byte) error {
return c.Del(gotils.B2S(key))
return c.Del(strconv.B2S(key))
}

// Iterator ...
Expand Down
3 changes: 1 addition & 2 deletions modules/cache/cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ import (
"testing"
"time"

"github.com/savsgio/kratgo/modules/config"

logger "github.com/savsgio/go-logger/v2"
"github.com/savsgio/kratgo/modules/config"
)

var testCache *Cache
Expand Down
6 changes: 3 additions & 3 deletions modules/cache/cache_types_gen_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions modules/cache/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ package cache
import (
"io"

"github.com/savsgio/kratgo/modules/config"

"github.com/allegro/bigcache/v2"
"github.com/savsgio/kratgo/modules/config"
)

// Config ...
Expand Down
13 changes: 6 additions & 7 deletions modules/invalidator/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ package invalidator
import (
"fmt"

"github.com/savsgio/kratgo/modules/cache"

"github.com/allegro/bigcache/v2"
"github.com/savsgio/gotils"
"github.com/savsgio/gotils/strconv"
"github.com/savsgio/kratgo/modules/cache"
)

func (i *Invalidator) deleteCacheKey(cacheKey string) error {
Expand All @@ -26,7 +25,7 @@ func (i *Invalidator) invalidateByHost(cacheKey string) error {
}

func (i *Invalidator) invalidateByPath(cacheKey string, cacheEntry cache.Entry, e Entry) error {
path := gotils.S2B(e.Path)
path := strconv.S2B(e.Path)

if !cacheEntry.HasResponse(path) {
return nil
Expand Down Expand Up @@ -54,7 +53,7 @@ func (i *Invalidator) invalidateByHeader(cacheKey string, cacheEntry cache.Entry
responses := cacheEntry.GetAllResponses()

for _, resp := range responses {
if !resp.HasHeader(gotils.S2B(e.Header.Key), gotils.S2B(e.Header.Value)) {
if !resp.HasHeader(strconv.S2B(e.Header.Key), strconv.S2B(e.Header.Value)) {
continue
}

Expand All @@ -78,14 +77,14 @@ func (i *Invalidator) invalidateByHeader(cacheKey string, cacheEntry cache.Entry
}

func (i *Invalidator) invalidateByPathHeader(cacheKey string, cacheEntry cache.Entry, e Entry) error {
path := gotils.S2B(e.Path)
path := strconv.S2B(e.Path)

resp := cacheEntry.GetResponse(path)
if resp == nil {
return nil
}

if !resp.HasHeader(gotils.S2B(e.Header.Key), gotils.S2B(e.Header.Value)) {
if !resp.HasHeader(strconv.S2B(e.Header.Key), strconv.S2B(e.Header.Value)) {
return nil
}

Expand Down
3 changes: 1 addition & 2 deletions modules/invalidator/invalidator.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ import (
"sync/atomic"
"time"

"github.com/savsgio/kratgo/modules/cache"

logger "github.com/savsgio/go-logger/v2"
"github.com/savsgio/kratgo/modules/cache"
)

// New ...
Expand Down
3 changes: 1 addition & 2 deletions modules/invalidator/invalidator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ import (
"testing"
"time"

logger "github.com/savsgio/go-logger/v2"
"github.com/savsgio/kratgo/modules/cache"
"github.com/savsgio/kratgo/modules/config"

logger "github.com/savsgio/go-logger/v2"
)

var testCache *cache.Cache
Expand Down
3 changes: 1 addition & 2 deletions modules/invalidator/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ package invalidator
import (
"io"

logger "github.com/savsgio/go-logger/v2"
"github.com/savsgio/kratgo/modules/cache"
"github.com/savsgio/kratgo/modules/config"

logger "github.com/savsgio/go-logger/v2"
)

// Config ...
Expand Down
5 changes: 2 additions & 3 deletions modules/proxy/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ import (
"strings"
"sync"

"github.com/savsgio/kratgo/modules/cache"
"github.com/savsgio/kratgo/modules/config"

logger "github.com/savsgio/go-logger/v2"
"github.com/savsgio/govaluate/v3"
"github.com/savsgio/kratgo/modules/cache"
"github.com/savsgio/kratgo/modules/config"
"github.com/valyala/fasthttp"
)

Expand Down
7 changes: 3 additions & 4 deletions modules/proxy/proxy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@ import (
"testing"
"time"

logger "github.com/savsgio/go-logger/v2"
"github.com/savsgio/gotils/strconv"
"github.com/savsgio/kratgo/modules/cache"
"github.com/savsgio/kratgo/modules/config"

logger "github.com/savsgio/go-logger/v2"
"github.com/savsgio/gotils"
"github.com/valyala/fasthttp"
)

Expand All @@ -43,7 +42,7 @@ func (mock *mockBackend) Do(req *fasthttp.Request, resp *fasthttp.Response) erro
resp.SetStatusCode(mock.statusCode)

for k, v := range mock.headers {
resp.Header.SetCanonical(gotils.S2B(k), v)
resp.Header.SetCanonical(strconv.S2B(k), v)
}

return mock.err
Expand Down
5 changes: 2 additions & 3 deletions modules/proxy/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ import (
"io"
"sync"

"github.com/savsgio/kratgo/modules/cache"
"github.com/savsgio/kratgo/modules/config"

logger "github.com/savsgio/go-logger/v2"
"github.com/savsgio/govaluate/v3"
"github.com/savsgio/kratgo/modules/cache"
"github.com/savsgio/kratgo/modules/config"
"github.com/valyala/fasthttp"
)

Expand Down
Loading

0 comments on commit 7c87a2e

Please sign in to comment.