Skip to content

Commit

Permalink
cleanup and upgrade of vendors
Browse files Browse the repository at this point in the history
  • Loading branch information
Cloud User committed Oct 9, 2023
1 parent 931c789 commit 1f35892
Show file tree
Hide file tree
Showing 1,170 changed files with 290,855 additions and 237,482 deletions.
28 changes: 3 additions & 25 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,9 @@ task:
env:
GOPROXY: https://proxy.golang.org
matrix:
VERSION: 1.15
VERSION: 1.16

container:
image: golang:$VERSION

name: test-$VERSION

test_script:
- apt-get update
- apt-get install -y asciidoc docbook-utils docbook-xml libxml2-utils xsltproc
- GOPATH=/tmp/go
- PATH="$PATH:$GOPATH/bin"
- mkdir -p $GOPATH/src/github.com/cea-hpc
- mv /tmp/cirrus-ci-build $GOPATH/src/github.com/cea-hpc/sshproxy
- cd $GOPATH/src/github.com/cea-hpc/sshproxy
- make
- make get-old-deps check

task:
env:
GOPROXY: https://proxy.golang.org
matrix:
VERSION: 1.17
VERSION: 1.18
VERSION: 1.19
VERSION: 1.20
VERSION: 1.21

container:
image: golang:$VERSION
Expand Down
7 changes: 2 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,8 @@ fmt:
$(GO) fmt $(PKGS)
$(GO) fmt $(TEST)

get-old-deps:
$(GO) get -u honnef.co/go/tools/cmd/[email protected]

get-deps:
$(GO) get -u honnef.co/go/tools/cmd/staticcheck
$(GO) install honnef.co/go/tools/cmd/staticcheck@latest

check:
$(GO) vet ./...
Expand All @@ -98,4 +95,4 @@ test:
clean:
rm -f $(EXE) $(MANDOC) doc/*.xml sshproxy_*.tar.gz

.PHONY: all exe doc install install-doc-man install-binaries package fmt get-old-deps get-deps check test clean
.PHONY: all exe doc install install-doc-man install-binaries package fmt get-deps check test clean
2 changes: 1 addition & 1 deletion cmd/sshproxy/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"strings"
"syscall"

"github.com/docker/docker/pkg/term"
"github.com/moby/term"
"github.com/kr/pty"
)

Expand Down
4 changes: 2 additions & 2 deletions cmd/sshproxy/sshproxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ import (

"github.com/cea-hpc/sshproxy/pkg/utils"

"github.com/docker/docker/pkg/term"
"github.com/moby/term"
"github.com/op/go-logging"
"go.etcd.io/etcd/clientv3"
"go.etcd.io/etcd/client/v3"
)

var (
Expand Down
39 changes: 29 additions & 10 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,21 +1,40 @@
module github.com/cea-hpc/sshproxy

go 1.15
go 1.21

require (
github.com/BurntSushi/toml v1.0.0 // indirect
github.com/coreos/etcd v2.3.8+incompatible // indirect
github.com/docker/docker v20.10.13+incompatible
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/kr/pty v1.1.8
github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 // indirect
github.com/olekukonko/tablewriter v0.0.5
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7
go.etcd.io/etcd v2.3.8+incompatible
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 // indirect
golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8 // indirect
golang.org/x/tools v0.1.10 // indirect
go.etcd.io/etcd/client/v3 v3.5.9
gopkg.in/yaml.v2 v2.4.0
honnef.co/go/tools v0.2.2 // indirect
)

require (
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
github.com/BurntSushi/toml v1.3.2 // indirect
github.com/coreos/go-semver v0.3.0 // indirect
github.com/coreos/go-systemd/v22 v22.3.2 // indirect
github.com/creack/pty v1.1.11 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/mattn/go-runewidth v0.0.9 // indirect
github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 // indirect
go.etcd.io/etcd/api/v3 v3.5.9 // indirect
go.etcd.io/etcd/client/pkg/v3 v3.5.9 // indirect
go.uber.org/atomic v1.7.0 // indirect
go.uber.org/multierr v1.6.0 // indirect
go.uber.org/zap v1.17.0 // indirect
golang.org/x/exp/typeparams v0.0.0-20231006140011-7918f672742d // indirect
golang.org/x/mod v0.13.0 // indirect
golang.org/x/net v0.16.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
golang.org/x/tools v0.14.0 // indirect
google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c // indirect
google.golang.org/grpc v1.41.0 // indirect
google.golang.org/protobuf v1.26.0 // indirect
honnef.co/go/tools v0.4.6 // indirect
)
177 changes: 157 additions & 20 deletions go.sum

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions pkg/utils/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ package utils

import (
"fmt"
"io/ioutil"
"os"
"regexp"
"strings"
"time"
Expand Down Expand Up @@ -207,7 +207,7 @@ func LoadConfig(filename, currentUsername, sid string, start time.Time, groups m
"{time}": {regexp.MustCompile(`{time}`), start.Format(time.RFC3339Nano)},
}

yamlFile, err := ioutil.ReadFile(filename)
yamlFile, err := os.ReadFile(filename)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/utils/etcd.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"time"

"github.com/op/go-logging"
"go.etcd.io/etcd/clientv3"
"go.etcd.io/etcd/client/v3"
"go.etcd.io/etcd/pkg/transport"
)

Expand Down
3 changes: 0 additions & 3 deletions pkg/utils/route.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ func selectDestinationOrdered(destinations []string, checker HostChecker, cli *C
// destinations and selects the first reachable one. It returns its host and
// port.
func selectDestinationRandom(destinations []string, checker HostChecker, cli *Client, key string) (string, error) {
rand.Seed(time.Now().UnixNano())
rdestinations := make([]string, len(destinations))
perm := rand.Perm(len(destinations))
for i, v := range perm {
Expand Down Expand Up @@ -126,7 +125,6 @@ func selectDestinationConnections(destinations []string, checker HostChecker, cl
case hostsc[destinations[i]] != hostsc[destinations[j]]:
return hostsc[destinations[i]] < hostsc[destinations[j]]
default:
rand.Seed(time.Now().UnixNano())
return rand.Intn(2) != 0
}
})
Expand Down Expand Up @@ -165,7 +163,6 @@ func selectDestinationBandwidth(destinations []string, checker HostChecker, cli
case hostsbw[destinations[i]] != hostsbw[destinations[j]]:
return hostsbw[destinations[i]] < hostsbw[destinations[j]]
default:
rand.Seed(time.Now().UnixNano())
return rand.Intn(2) != 0
}
})
Expand Down
5 changes: 2 additions & 3 deletions test/centos-image/sshproxy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"encoding/json"
"fmt"
"io"
"io/ioutil"
"log"
"net"
"os"
Expand Down Expand Up @@ -94,10 +93,10 @@ func runCommand(ctx context.Context, name string, args []string, env []string, p
processChan <- cmd.Process
}

stdout, _ := ioutil.ReadAll(stdoutPipe)
stdout, _ := io.ReadAll(stdoutPipe)
stderr := []byte{}
if ctx.Err() != context.DeadlineExceeded {
stderr, _ = ioutil.ReadAll(stderrPipe)
stderr, _ = io.ReadAll(stderrPipe)
}

err = cmd.Wait()
Expand Down
21 changes: 21 additions & 0 deletions vendor/github.com/Azure/go-ansiterm/LICENSE

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

12 changes: 12 additions & 0 deletions vendor/github.com/Azure/go-ansiterm/README.md

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

Loading

0 comments on commit 1f35892

Please sign in to comment.