mirror of
https://github.com/HDT3213/godis.git
synced 2025-10-05 08:46:56 +08:00
upgrade to go 1.16 and add a banner
This commit is contained in:
@@ -1,3 +1,3 @@
|
|||||||
#!/usr/bin/env bash
|
#!/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
build.sh
2
build.sh
@@ -1,3 +1,3 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
go build -i -o target/godis-darwin ./src/cmd
|
go build -o target/godis-darwin ./cmd
|
||||||
|
6
cmd/banner.txt
Normal file
6
cmd/banner.txt
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
______ ___
|
||||||
|
/ ____/___ ____/ (_)____
|
||||||
|
/ / __/ __ \/ __ / / ___/
|
||||||
|
/ /_/ / /_/ / /_/ / (__ )
|
||||||
|
\____/\____/\__,_/_/____/
|
||||||
|
|
@@ -1,6 +1,7 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
_ "embed"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/hdt3213/godis/config"
|
"github.com/hdt3213/godis/config"
|
||||||
"github.com/hdt3213/godis/lib/logger"
|
"github.com/hdt3213/godis/lib/logger"
|
||||||
@@ -9,7 +10,11 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
//go:embed banner.txt
|
||||||
|
var banner string
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
print(banner)
|
||||||
configFilename := os.Getenv("CONFIG")
|
configFilename := os.Getenv("CONFIG")
|
||||||
if configFilename == "" {
|
if configFilename == "" {
|
||||||
configFilename = "redis.conf"
|
configFilename = "redis.conf"
|
||||||
|
Reference in New Issue
Block a user