mirror of
https://github.com/kataras/iris.git
synced 2025-12-23 04:47:02 +00:00
Updated all dependencies one by one to go.mod - Backup and remove the vendor folder entirely and update most of the examples - next commit will contain the rest of the updated
Former-commit-id: 2791c50256c0f00d6e08a408e5cb009262c49588
This commit is contained in:
@@ -3,7 +3,7 @@ package main
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/iris-contrib/httpexpect"
|
||||
"github.com/gavv/httpexpect"
|
||||
"github.com/kataras/iris/httptest"
|
||||
)
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ package main
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/iris-contrib/httpexpect"
|
||||
"github.com/gavv/httpexpect"
|
||||
"github.com/kataras/iris/httptest"
|
||||
)
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
|
||||
prometheusMiddleware "github.com/iris-contrib/middleware/prometheus"
|
||||
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
"github.com/prometheus/client_golang/prometheus/promhttp"
|
||||
)
|
||||
|
||||
func main() {
|
||||
@@ -31,7 +31,7 @@ func main() {
|
||||
ctx.Writef("Slept for %d milliseconds", sleep)
|
||||
})
|
||||
|
||||
app.Get("/metrics", iris.FromStd(prometheus.Handler()))
|
||||
app.Get("/metrics", iris.FromStd(promhttp.Handler()))
|
||||
|
||||
// http://localhost:8080/
|
||||
// http://localhost:8080/anotfound
|
||||
|
||||
@@ -89,9 +89,10 @@ func TestEmbeddingGzipFilesIntoApp(t *testing.T) {
|
||||
if expected, got := response.Raw().StatusCode, httptest.StatusOK; expected != got {
|
||||
t.Fatalf("[%d] of '%s': expected %d status code but got %d", i, url, expected, got)
|
||||
}
|
||||
rawBody := response.Body().Raw()
|
||||
|
||||
func() {
|
||||
reader, err := gzip.NewReader(bytes.NewBuffer(response.Content))
|
||||
reader, err := gzip.NewReader(strings.NewReader(rawBody))
|
||||
defer reader.Close()
|
||||
if err != nil {
|
||||
t.Fatalf("[%d] of '%s': %v", i, url, err)
|
||||
|
||||
7
_examples/http-listening/http3-quic/go.mod
Normal file
7
_examples/http-listening/http3-quic/go.mod
Normal file
@@ -0,0 +1,7 @@
|
||||
module github.com/kataras/iris/_examples/http-listening/http3-quic
|
||||
|
||||
go 1.12
|
||||
|
||||
require (
|
||||
github.com/prometheus/client_golang v1.0.0
|
||||
)
|
||||
@@ -8,7 +8,10 @@ import (
|
||||
|
||||
/*
|
||||
$ go get -u github.com/lucas-clemente/quic-go/...
|
||||
# or if you're using GO MODULES:
|
||||
$ go get github.com/lucas-clemente/quic-go@master
|
||||
*/
|
||||
|
||||
func main() {
|
||||
app := iris.New()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user