diff --git a/core/src/main/golang/native/tunnel/providers.go b/core/src/main/golang/native/tunnel/providers.go index 26dfe0f68..5e3d2cb3e 100644 --- a/core/src/main/golang/native/tunnel/providers.go +++ b/core/src/main/golang/native/tunnel/providers.go @@ -5,7 +5,6 @@ import ( "fmt" "time" - P "github.com/metacubex/mihomo/adapter/provider" "github.com/metacubex/mihomo/constant/provider" "github.com/metacubex/mihomo/log" "github.com/metacubex/mihomo/tunnel" @@ -20,6 +19,10 @@ type Provider struct { UpdatedAt int64 `json:"updatedAt"` } +type UpdatableProvider interface { + UpdatedAt() time.Time +} + func QueryProviders() []*Provider { r := tunnel.RuleProviders() p := tunnel.Providers() @@ -47,7 +50,7 @@ func QueryProviders() []*Provider { for _, p := range providers { updatedAt := time.Time{} - if s, ok := p.(P.UpdatableProvider); ok { + if s, ok := p.(UpdatableProvider); ok { updatedAt = s.UpdatedAt() }