mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-14 06:57:35 +08:00
use base context to handle the cases where the user IP address is unavailable
This commit is contained in:
@@ -12,6 +12,11 @@ type CliContext struct {
|
||||
command *cli.Command
|
||||
}
|
||||
|
||||
// ClientIP returns the client IP address, for CLI context, it always returns the loopback address
|
||||
func (c *CliContext) ClientIP() string {
|
||||
return "127.0.0.1"
|
||||
}
|
||||
|
||||
// GetContextId returns the current context id
|
||||
func (c *CliContext) GetContextId() string {
|
||||
return ""
|
||||
|
||||
Reference in New Issue
Block a user