feat: login
This commit is contained in:
@@ -30,7 +30,7 @@ func InitClient(cfg *config.Config) error {
|
||||
)
|
||||
logger = zap.New(logCore)
|
||||
|
||||
client = NewClient(cfg)
|
||||
client = NewClient(logger, cfg)
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -39,8 +39,12 @@ func Close() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func getClient() *TClient {
|
||||
return client
|
||||
}
|
||||
|
||||
func wrapE(f func(context.Context) error) func(cmd *cobra.Command, args []string) error {
|
||||
return func(cmd *cobra.Command, args []string) error {
|
||||
return client.Client.Run(context.Background(), f)
|
||||
return getClient().Client.Run(context.Background(), f)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user