Skip to content

Commit

Permalink
upgrade to go 1.16 and add a banner
Browse files Browse the repository at this point in the history
  • Loading branch information
HDT3213 committed May 2, 2021
1 parent f29298c commit 12b1775
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build-linux.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env bash

CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o target/godis-linux ./src/cmd
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o target/godis-linux ./cmd
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env bash

go build -i -o target/godis-darwin ./src/cmd
go build -o target/godis-darwin ./cmd
6 changes: 6 additions & 0 deletions cmd/banner.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
______ ___
/ ____/___ ____/ (_)____
/ / __/ __ \/ __ / / ___/
/ /_/ / /_/ / /_/ / (__ )
\____/\____/\__,_/_/____/

5 changes: 5 additions & 0 deletions cmd/main.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package main

import (
_ "embed"
"fmt"
"github.com/hdt3213/godis/config"
"github.com/hdt3213/godis/lib/logger"
Expand All @@ -9,7 +10,11 @@ import (
"os"
)

//go:embed banner.txt
var banner string

func main() {
print(banner)
configFilename := os.Getenv("CONFIG")
if configFilename == "" {
configFilename = "redis.conf"
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/hdt3213/godis

go 1.12
go 1.16

require (
github.com/jolestar/go-commons-pool/v2 v2.1.1
Expand Down

0 comments on commit 12b1775

Please sign in to comment.