1 Star 0 Fork 17

理工男/redis-tui

forked from mylxsw/redis-tui 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
main.go 1.08 KB
一键复制 编辑 原始数据 按行查看 历史
package main
import (
"flag"
"fmt"
"github.com/mylxsw/redis-tui/api"
"github.com/mylxsw/redis-tui/config"
"github.com/mylxsw/redis-tui/core"
"github.com/mylxsw/redis-tui/tui"
)
var conf = config.Config{}
var Version string
var GitCommit string
func main() {
flag.StringVar(&conf.Host, "h", "127.0.0.1", "Server hostname")
flag.IntVar(&conf.Port, "p", 6379, "Server port")
flag.StringVar(&conf.Password, "a", "", "Password to use when connecting to the server")
flag.IntVar(&conf.DB, "n", 0, "Database number")
flag.BoolVar(&conf.Cluster, "c", false, "Enable cluster mode")
flag.BoolVar(&conf.Debug, "vvv", false, "Enable debug mode")
var showVersion bool
flag.BoolVar(&showVersion, "v", false, "Show version and exit")
flag.Parse()
if len(GitCommit) > 8 {
GitCommit = GitCommit[:8]
}
if showVersion {
fmt.Printf("Version: %s\nGitCommit: %s\n", Version, GitCommit)
return
}
outputChan := make(chan core.OutputMessage, 100)
if err := tui.NewRedisTUI(api.NewRedisClient(conf, outputChan), 100, Version, GitCommit, outputChan, conf).Start(); err != nil {
panic(err)
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/HappyUncle/redis-tui.git
[email protected]:HappyUncle/redis-tui.git
HappyUncle
redis-tui
redis-tui
master

搜索帮助