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

mod: bump golang.org/x/crypto from 0.26.0 to 0.27.0 #249

Merged
merged 2 commits into from
Sep 9, 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
8 changes: 4 additions & 4 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v2
with:
Expand All @@ -33,16 +33,16 @@ jobs:
name: Test
strategy:
matrix:
go-version: [ 1.18.x, 1.19.x, 1.20.x ]
go-version: [ 1.22.x, 1.23.x ]
platform: [ ubuntu-latest, macos-latest, windows-latest ]
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Run tests with coverage
run: go test -v -race -coverprofile=coverage -covermode=atomic ./...
- name: Upload coverage report to Codecov
Expand Down
28 changes: 0 additions & 28 deletions .github/workflows/lsif.yml

This file was deleted.

3 changes: 1 addition & 2 deletions context.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import (
"encoding/hex"
"html/template"
"io"
"io/ioutil"
"mime/multipart"
"net/http"
"net/url"
Expand Down Expand Up @@ -49,7 +48,7 @@ type RequestBody struct {

// Bytes reads and returns content of request body in bytes.
func (rb *RequestBody) Bytes() ([]byte, error) {
return ioutil.ReadAll(rb.reader)
return io.ReadAll(rb.reader)
}

// String reads and returns content of request body in string.
Expand Down
6 changes: 3 additions & 3 deletions context_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ package macaron

import (
"bytes"
"io/ioutil"
"io"
"net/http"
"net/http/httptest"
"net/url"
Expand All @@ -41,7 +41,7 @@ func Test_Context(t *testing.T) {

Convey("Get request body", func() {
m.Get("/body1", func(ctx *Context) {
data, err := ioutil.ReadAll(ctx.Req.Body().ReadCloser())
data, err := io.ReadAll(ctx.Req.Body().ReadCloser())
So(err, ShouldBeNil)
So(string(data), ShouldEqual, "This is my request body")
})
Expand All @@ -64,7 +64,7 @@ func Test_Context(t *testing.T) {
for i := 1; i <= 4; i++ {
resp := httptest.NewRecorder()
req, err := http.NewRequest("GET", "/body"+com.ToStr(i), nil)
req.Body = ioutil.NopCloser(bytes.NewBufferString("This is my request body"))
req.Body = io.NopCloser(bytes.NewBufferString("This is my request body"))
So(err, ShouldBeNil)
m.ServeHTTP(resp, req)
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/go-macaron/inject v0.0.0-20160627170012-d8a0b8677191
github.com/smartystreets/goconvey v1.8.1
github.com/unknwon/com v0.0.0-20190804042917-757f69c95f3e
golang.org/x/crypto v0.26.0
golang.org/x/crypto v0.27.0
gopkg.in/ini.v1 v1.66.6
)

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5Cc
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/unknwon/com v0.0.0-20190804042917-757f69c95f3e h1:GSGeB9EAKY2spCABz6xOX5DbxZEXolK+nBSvmsQwRjM=
github.com/unknwon/com v0.0.0-20190804042917-757f69c95f3e/go.mod h1:tOOxU81rwgoCLoOVVPHb6T/wt8HZygqH5id+GNnlCXM=
golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw=
golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54=
golang.org/x/crypto v0.27.0 h1:GXm2NjJrPaiv/h1tb2UH8QfgC/hOf/+z0p6PT8o1w7A=
golang.org/x/crypto v0.27.0/go.mod h1:1Xngt8kV6Dvbssa53Ziq6Eqn0HqbZi5Z6R0ZpwQzt70=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/ini.v1 v1.66.6 h1:LATuAqN/shcYAOkv3wl2L4rkaKqkcgTBQjOyYDvcPKI=
gopkg.in/ini.v1 v1.66.6/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
Expand Down
4 changes: 2 additions & 2 deletions recovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ package macaron
import (
"bytes"
"fmt"
"io/ioutil"
"log"
"net/http"
"os"
"runtime"

"github.com/go-macaron/inject"
Expand Down Expand Up @@ -85,7 +85,7 @@ func stack(skip int) []byte {
// Print this much at least. If we can't find the source, it won't show.
fmt.Fprintf(buf, "%s:%d (0x%x)\n", file, line, pc)
if file != lastFile {
data, err := ioutil.ReadFile(file)
data, err := os.ReadFile(file)
if err != nil {
continue
}
Expand Down
3 changes: 1 addition & 2 deletions render.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import (
"fmt"
"html/template"
"io"
"io/ioutil"
"net/http"
"os"
"path"
Expand Down Expand Up @@ -223,7 +222,7 @@ func NewTemplateFileSystem(opt RenderOptions, omitData bool) TplFileSystem {
continue
}

data, err = ioutil.ReadFile(path)
data, err = os.ReadFile(path)
if err != nil {
return err
}
Expand Down
3 changes: 1 addition & 2 deletions static_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ package macaron
import (
"bytes"
"fmt"
"io/ioutil"
"net/http"
"net/http/httptest"
"os"
Expand Down Expand Up @@ -68,7 +67,7 @@ func Test_Static(t *testing.T) {

Convey("Serve static files with local path", t, func() {
Root = os.TempDir()
f, err := ioutil.TempFile(Root, "static_content")
f, err := os.CreateTemp(Root, "static_content")
So(err, ShouldBeNil)
_, _ = f.WriteString("Expected Content")
f.Close()
Expand Down
Loading