Skip to content

Commit 69cade9

Browse files
committedAug 2, 2020
fix goreleaser, add version
1 parent 28738d8 commit 69cade9

File tree

3 files changed

+5
-30
lines changed

3 files changed

+5
-30
lines changed
 

‎.github/goreleaser.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# test this file with
22
# goreleaser --skip-publish --rm-dist --config goreleaser.yml
33
builds:
4-
- main: ./main.go
4+
- main: ./cmd/tcp-proxy
5+
binary: tcp-proxy
56
env:
67
- CGO_ENABLED=0
78
ldflags:

‎.goreleaser.yml

-27
This file was deleted.

‎cmd/tcp-proxy/main.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@ import (
88
"regexp"
99
"strings"
1010

11-
"github.com/jpillora/go-tcp-proxy"
11+
proxy "github.com/jpillora/go-tcp-proxy"
1212
)
1313

1414
var (
15+
version = "0.0.0-src"
1516
matchid = uint64(0)
1617
connid = uint64(0)
1718
logger proxy.ColorLogger
@@ -36,7 +37,7 @@ func main() {
3637
Color: *colors,
3738
}
3839

39-
logger.Info("Proxying from %v to %v", *localAddr, *remoteAddr)
40+
logger.Info("go-tcp-proxy (%s) proxing from %v to %v ", version, *localAddr, *remoteAddr)
4041

4142
laddr, err := net.ResolveTCPAddr("tcp", *localAddr)
4243
if err != nil {

0 commit comments

Comments
 (0)