mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2025-12-06 13:54:41 +08:00
20 lines
283 B
Go
20 lines
283 B
Go
package hook
|
|
|
|
import "github.com/rs/zerolog/log"
|
|
|
|
type IpResult struct {
|
|
Err error
|
|
IP string
|
|
}
|
|
|
|
func (r *IpResult) Error() error {
|
|
return r.Err
|
|
}
|
|
|
|
func (r *IpResult) GetResult() string {
|
|
if r.Err != nil {
|
|
log.Printf("⚠️ 执行GetIP时出错: %v", r.Err)
|
|
}
|
|
return r.IP
|
|
}
|