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

feat: support arm64 #36

Merged
merged 2 commits into from
Sep 22, 2023
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/kwt
/kwt-darwin-amd64
/kwt-linux-amd64
/kwt-*-*
/tmp
59 changes: 59 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
module github.com/k14s/kwt

go 1.20

require (
github.com/cppforlife/cobrautil v0.0.0-20180924214100-a39a1714c920
github.com/cppforlife/go-cli-ui v0.0.0-20180806172124-5c4f53402506
github.com/miekg/dns v1.0.8
github.com/spf13/cobra v0.0.3
github.com/spf13/pflag v1.0.2
golang.org/x/crypto v0.13.0
gopkg.in/yaml.v2 v2.3.0
k8s.io/api v0.0.0-20180628040859-072894a440bd
k8s.io/apimachinery v0.0.0-20180621070125-103fd098999d
k8s.io/client-go v0.0.0-20180628043050-7d04d0e2a0a1
)

require (
cloud.google.com/go v0.25.0 // indirect
github.com/Azure/go-autorest v10.15.0+incompatible // indirect
github.com/cpuguy83/go-md2man v1.0.8 // indirect
github.com/dgrijalva/jwt-go v3.2.0+incompatible // indirect
github.com/docker/spdystream v0.0.0-20170912183627-bc6354cbbc29 // indirect
github.com/elazarl/goproxy v0.0.0-20221015165544-a0805db90819 // indirect
github.com/fatih/color v1.7.0 // indirect
github.com/ghodss/yaml v1.0.0 // indirect
github.com/gogo/protobuf v1.1.1 // indirect
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/btree v1.0.0 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf // indirect
github.com/googleapis/gnostic v0.2.0 // indirect
github.com/gophercloud/gophercloud v0.0.0-20180727150635-f8826f28e31a // indirect
github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 // indirect
github.com/imdario/mergo v0.3.5 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/json-iterator/go v0.0.0-20180701071628-ab8a2e0c74be // indirect
github.com/kr/pty v1.1.8 // indirect
github.com/mattn/go-colorable v0.0.9 // indirect
github.com/mattn/go-isatty v0.0.3 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742 // indirect
github.com/onsi/ginkgo v1.16.5 // indirect
github.com/onsi/gomega v1.27.2 // indirect
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
github.com/russross/blackfriday v1.5.1 // indirect
github.com/stretchr/testify v1.8.2 // indirect
github.com/vito/go-interact v0.0.0-20171111012221-fa338ed9e9ec // indirect
golang.org/x/net v0.10.0 // indirect
golang.org/x/oauth2 v0.0.0-20180724155351-3d292e4d0cdc // indirect
golang.org/x/sys v0.12.0 // indirect
golang.org/x/term v0.12.0 // indirect
golang.org/x/text v0.13.0 // indirect
golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2 // indirect
google.golang.org/appengine v1.1.0 // indirect
google.golang.org/protobuf v1.28.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
)
188 changes: 188 additions & 0 deletions go.sum

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion hack/build-binaries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
set -e -x -u

GOOS=darwin GOARCH=amd64 go build -o kwt-darwin-amd64 ./cmd/...
GOOS=darwin GOARCH=arm64 go build -o kwt-darwin-arm64 ./cmd/...
GOOS=linux GOARCH=amd64 go build -o kwt-linux-amd64 ./cmd/...
GOOS=linux GOARCH=arm64 go build -o kwt-linux-arm64 ./cmd/...

shasum -a 256 ./kwt-*-amd64
shasum -a 256 ./kwt-*
4 changes: 3 additions & 1 deletion pkg/kwt/cmd/core/strings_single_line_value.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ type ValueStringsSingleLine struct {
S []string
}

func NewValueStringsSingleLine(s []string) ValueStringsSingleLine { return ValueStringsSingleLine{S: s} }
func NewValueStringsSingleLine(s []string) ValueStringsSingleLine {
return ValueStringsSingleLine{S: s}
}

func (t ValueStringsSingleLine) String() string { return strings.Join(t.S, ", ") }
func (t ValueStringsSingleLine) Value() uitable.Value { return t }
Expand Down
2 changes: 1 addition & 1 deletion pkg/kwt/cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
)

const (
Version = "0.0.6"
Version = "0.0.7"
)

type VersionOptions struct {
Expand Down
7 changes: 2 additions & 5 deletions pkg/kwt/net/dstconn/ssh_client.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package dstconn

import (
"errors"
"fmt"
"io"
"net"
Expand Down Expand Up @@ -105,13 +106,9 @@ func (c *SSHClient) NewListener() (net.Listener, error) {
}

func (c *SSHClient) detectConnBrokenErr(err error) error {
isEOF := err == io.EOF
_, isUnexpected := err.(gossh.UnexpectedPackerErr)

if isEOF || isUnexpected {
if err == io.EOF || errors.Is(err, io.ErrUnexpectedEOF) {
return ConnectionBrokenErr{err}
}

return err
}

Expand Down
1 change: 1 addition & 0 deletions pkg/kwt/net/forwarder/linux_orig_dst_resolver_linux.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build linux
// +build linux

package forwarder
Expand Down
1 change: 1 addition & 0 deletions pkg/kwt/net/forwarder/linux_orig_dst_resolver_other.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !linux
// +build !linux

package forwarder
Expand Down
Loading