Add info command (#141)

* Generate a new runid for each start of godis

* Add info command

* Add info command

* Generate a new runid for each start of godis

* Add unittests for the info command
This commit is contained in:
bjr
2023-03-19 16:17:40 +08:00
committed by GitHub
parent 3e6d2090c5
commit d7f6420f69
5 changed files with 128 additions and 2 deletions

View File

@@ -4,6 +4,7 @@ import (
"fmt"
"github.com/hdt3213/godis/config"
"github.com/hdt3213/godis/lib/logger"
"github.com/hdt3213/godis/lib/utils"
RedisServer "github.com/hdt3213/godis/redis/server"
"github.com/hdt3213/godis/tcp"
"os"
@@ -23,6 +24,7 @@ var defaultProperties = &config.ServerProperties{
AppendOnly: false,
AppendFilename: "",
MaxClients: 1000,
RunID: utils.RandString(40),
}
func fileExists(filename string) bool {