Skip to content

Commit 4a5e358

Browse files
committed
Sample client
1 parent b7dc9e2 commit 4a5e358

File tree

4 files changed

+28
-3
lines changed

4 files changed

+28
-3
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ vendor/
2222

2323
# End of https://www.gitignore.io/api/go
2424
example-client
25+
bin/

Makefile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
LINUX=bin/nhite-sample-cli-linux-amd64
2+
WINDOWS64=bin/nhite-sample-cli-amd64.exe
3+
DARWIN=bin/nhite-sample-cli-darwin64
4+
5+
# These are the values we want to pass for VERSION and BUILD
6+
# # git tag 1.0.1
7+
# # git commit -am "One more change after the tags"
8+
VERSION=`git describe --tags`
9+
BUILD=`date +%FT%T%z`
10+
11+
LDFLAGS=-ldflags "-w -s -X main.Version=${VERSION} -X main.Build=${BUILD}"
12+
13+
all: $(LINUX) $(WINDOWS64) $(WINDOWS32) $(DARWIN)
14+
15+
$(LINUX): *.go
16+
GOOS=linux GOARCH=amd64 go build ${LDFLAGS} -o $(LINUX) *.go
17+
18+
$(WINDOWS64): *.go
19+
GOOS=windows GOARCH=amd64 go build ${LDFLAGS} -o $(WINDOWS64) *.go
20+
21+
$(DARWIN): *.go
22+
GOOS=darwin GOARCH=amd64 go build ${LDFLAGS} -o $(DARWIN) *.go
23+
24+

env.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
export TAAS_CLIENT_CERT_FILE="../out/test.crt"
2-
export TAAS_CLIENT_TAAS_ADDRESS="127.0.0.1:1234"
1+
export NHITE_CLIENT_CERT_FILE="../out/test.crt"
2+
export NHITE_CLIENT_TAAS_ADDRESS="127.0.0.1:1234"

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import (
1919
"google.golang.org/grpc/credentials"
2020
)
2121

22-
const envPrefix = "TAAS_CLIENT"
22+
const envPrefix = "NHITE_CLIENT"
2323

2424
type configuration struct {
2525
CertFile string `envconfig:"CERT_FILE" required:"true"`

0 commit comments

Comments
 (0)