feat: add unix socket api(set debug)
This commit is contained in:
@ -6,6 +6,7 @@ import (
|
||||
"net/rpc"
|
||||
"net/url"
|
||||
"ultone/internal/log"
|
||||
"ultone/internal/opt"
|
||||
"ultone/internal/unix"
|
||||
)
|
||||
|
||||
@ -38,7 +39,7 @@ var (
|
||||
)
|
||||
|
||||
func initCli() {
|
||||
cliCommand.PersistentFlags().StringVar(&svc, "svc", "unix:///tmp/.cli.sock", "server unix listen address")
|
||||
cliCommand.PersistentFlags().StringVar(&svc, "svc", opt.RpcAddress, "server unix listen address")
|
||||
cliCommand.AddCommand(&cobra.Command{
|
||||
Use: "set",
|
||||
RunE: func(cmd *cobra.Command, args []string) (err error) {
|
||||
@ -65,6 +66,8 @@ func initCli() {
|
||||
}
|
||||
|
||||
log.Info(cmd.Context(), out.Msg)
|
||||
default:
|
||||
return fmt.Errorf("unknown set variable(debug is available now)")
|
||||
}
|
||||
|
||||
return nil
|
||||
|
Reference in New Issue
Block a user