Skip to content

Commit 675ded6

Browse files
committed
Update dependencies
1 parent 57127cf commit 675ded6

File tree

8 files changed

+52
-506
lines changed

8 files changed

+52
-506
lines changed

.github/workflows/lint.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414
strategy:
1515
matrix:
16-
go-version: [1.18]
16+
go-version: [1.20]
1717

1818
steps:
1919
- name: Setup Go ${{ matrix.go-version }}

.github/workflows/test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414
strategy:
1515
matrix:
16-
go-version: [1.18]
16+
go-version: [1.20]
1717

1818
steps:
1919
- name: Setup Go ${{ matrix.go-version }}

.goreleaser.yml

-7
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,6 @@ builds:
1010
goarch: [amd64, arm64]
1111
env:
1212
- CGO_ENABLED=0
13-
ignore:
14-
- goos: freebsd
15-
goarch: arm64
16-
- goos: darwin
17-
goarch: arm64
18-
- goos: windows
19-
goarch: arm64
2013

2114
archive:
2215
replacements:

client_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package main
22

33
import (
44
"bytes"
5-
"io/ioutil"
5+
"io"
66
"net/http"
77
"net/http/httptest"
88
"testing"
@@ -166,13 +166,13 @@ func TestInvalidRequestURI(t *testing.T) {
166166
w := httptest.NewRecorder()
167167
r := &http.Request{
168168
RequestURI: "%zz",
169-
Body: ioutil.NopCloser(bytes.NewReader(nil)),
169+
Body: io.NopCloser(bytes.NewReader(nil)),
170170
}
171171

172172
NewProxy().ServeHTTP(w, r)
173173

174174
res := w.Result()
175-
body, err := ioutil.ReadAll(res.Body)
175+
body, err := io.ReadAll(res.Body)
176176
res.Body.Close()
177177

178178
assert.NoError(err)

go.mod

+13-14
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,25 @@
11
module github.com/digineo/http-over-ssh
22

3-
go 1.17
3+
go 1.20
44

55
require (
6-
github.com/prometheus/client_golang v1.13.0
7-
github.com/stretchr/testify v1.8.0
8-
golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa
6+
github.com/prometheus/client_golang v1.14.0
7+
github.com/stretchr/testify v1.8.2
8+
golang.org/x/crypto v0.7.0
99
)
1010

1111
require (
1212
github.com/beorn7/perks v1.0.1 // indirect
13-
github.com/cespare/xxhash/v2 v2.1.2 // indirect
13+
github.com/cespare/xxhash/v2 v2.2.0 // indirect
1414
github.com/davecgh/go-spew v1.1.1 // indirect
15-
github.com/golang/protobuf v1.5.2 // indirect
16-
github.com/kr/pretty v0.3.0 // indirect
17-
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
15+
github.com/golang/protobuf v1.5.3 // indirect
16+
github.com/kr/pretty v0.3.1 // indirect
17+
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
1818
github.com/pmezard/go-difflib v1.0.0 // indirect
19-
github.com/prometheus/client_model v0.2.0 // indirect
20-
github.com/prometheus/common v0.37.0 // indirect
21-
github.com/prometheus/procfs v0.8.0 // indirect
22-
golang.org/x/sys v0.0.0-20220808155132-1c4a2a72c664 // indirect
23-
google.golang.org/protobuf v1.28.1 // indirect
24-
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
19+
github.com/prometheus/client_model v0.3.0 // indirect
20+
github.com/prometheus/common v0.42.0 // indirect
21+
github.com/prometheus/procfs v0.9.0 // indirect
22+
golang.org/x/sys v0.6.0 // indirect
23+
google.golang.org/protobuf v1.30.0 // indirect
2524
gopkg.in/yaml.v3 v3.0.1 // indirect
2625
)

go.sum

+30-475
Large diffs are not rendered by default.

http_test.go

+2-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package main
33
import (
44
"fmt"
55
"io"
6-
"io/ioutil"
76
"log"
87
"net"
98
"net/http"
@@ -102,7 +101,7 @@ func TestHTTP(t *testing.T) {
102101
assert.EqualValues(0, metrics.forwardings.failed)
103102
assert.Equal(200, response.StatusCode)
104103

105-
bytes, _ := ioutil.ReadAll(response.Body)
104+
bytes, _ := io.ReadAll(response.Body)
106105
assert.Equal("Hello World", string(bytes))
107106
response.Body.Close()
108107
}
@@ -150,7 +149,7 @@ func TestHTTP(t *testing.T) {
150149
assert.NoError(err)
151150
if response != nil {
152151
assert.Equal(200, response.StatusCode)
153-
bytes, _ := ioutil.ReadAll(response.Body)
152+
bytes, _ := io.ReadAll(response.Body)
154153
assert.Contains(string(bytes), `sshproxy_connections_total{state="established"} 1`)
155154
response.Body.Close()
156155
}

keys.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
package main
22

33
import (
4-
"io/ioutil"
54
"log"
5+
"os"
66

77
"golang.org/x/crypto/ssh"
88
)
99

1010
// Reads a SSH private key file.
1111
func getKeyFile(path string) (ssh.Signer, error) {
12-
buf, err := ioutil.ReadFile(path)
12+
buf, err := os.ReadFile(path)
1313
if err != nil {
1414
return nil, err
1515
}

0 commit comments

Comments
 (0)