cmd: refactoring Run function

So it's easier, more clear, more isolation between code on non-mobile
and mobile platforms.
This commit is contained in:
Cuong Manh Le
2023-09-19 16:29:01 +00:00
committed by Cuong Manh Le
parent 507c1afd59
commit bed7435b0c
4 changed files with 53 additions and 35 deletions
+3
View File
@@ -1,5 +1,7 @@
package cli
// AppCallback provides hooks for injecting certain functionalities
// from mobile platforms to main ctrld cli.
type AppCallback struct {
HostName func() string
LanIp func() string
@@ -7,6 +9,7 @@ type AppCallback struct {
Exit func(error string)
}
// AppConfig allows overwriting ctrld cli flags from mobile platforms.
type AppConfig struct {
CdUID string
HomeDir string