Skip to content

Commit

Permalink
fix tcpproxy and add vet to ci
Browse files Browse the repository at this point in the history
  • Loading branch information
waynz0r committed Jun 30, 2023
1 parent 370fc5d commit 9dbdfdf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,11 @@ jobs:
restore-keys: |
build-deps-v2
- name: Run unit tests
run: make test
- name: Run vet
run: make vet-all

- name: Run lint
run: make lint-all

- name: Run unit tests
run: make test
8 changes: 5 additions & 3 deletions examples/tcpproxy/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"flag"
"net"
"os"
"time"

"k8s.io/klog/v2"

Expand Down Expand Up @@ -61,7 +62,6 @@ func getIIH(ctx context.Context) (istio.IstioIntegrationHandler, error) {
}

func main() {

ctx, cancel := context.WithCancel(context.Background())
defer cancel()

Expand All @@ -80,8 +80,10 @@ func main() {
panic(err)
}

// d := &net.Dialer{}
d, err := iih.GetTCPDialer()
netDialer := &net.Dialer{
Timeout: time.Second * 10,
}
d, err := iih.GetTCPDialer(netDialer)
if err != nil {
panic(err)
}
Expand Down

0 comments on commit 9dbdfdf

Please sign in to comment.