Skip to content

Commit 12b1775

Browse files
committed
upgrade to go 1.16 and add a banner
1 parent f29298c commit 12b1775

File tree

5 files changed

+14
-3
lines changed

5 files changed

+14
-3
lines changed

build-linux.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/usr/bin/env bash
22

3-
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o target/godis-linux ./src/cmd
3+
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o target/godis-linux ./cmd

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/usr/bin/env bash
22

3-
go build -i -o target/godis-darwin ./src/cmd
3+
go build -o target/godis-darwin ./cmd

cmd/banner.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
______ ___
2+
/ ____/___ ____/ (_)____
3+
/ / __/ __ \/ __ / / ___/
4+
/ /_/ / /_/ / /_/ / (__ )
5+
\____/\____/\__,_/_/____/
6+

cmd/main.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package main
22

33
import (
4+
_ "embed"
45
"fmt"
56
"github.com/hdt3213/godis/config"
67
"github.com/hdt3213/godis/lib/logger"
@@ -9,7 +10,11 @@ import (
910
"os"
1011
)
1112

13+
//go:embed banner.txt
14+
var banner string
15+
1216
func main() {
17+
print(banner)
1318
configFilename := os.Getenv("CONFIG")
1419
if configFilename == "" {
1520
configFilename = "redis.conf"

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/hdt3213/godis
22

3-
go 1.12
3+
go 1.16
44

55
require (
66
github.com/jolestar/go-commons-pool/v2 v2.1.1

0 commit comments

Comments
 (0)