Skip to content

Commit bbe9dc4

Browse files
committed
move UpdatableProvider define in here
1 parent 3ce6604 commit bbe9dc4

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

core/src/main/golang/native/tunnel/providers.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55
"fmt"
66
"time"
77

8-
P "github.com/metacubex/mihomo/adapter/provider"
98
"github.com/metacubex/mihomo/constant/provider"
109
"github.com/metacubex/mihomo/log"
1110
"github.com/metacubex/mihomo/tunnel"
@@ -20,6 +19,10 @@ type Provider struct {
2019
UpdatedAt int64 `json:"updatedAt"`
2120
}
2221

22+
type UpdatableProvider interface {
23+
UpdatedAt() time.Time
24+
}
25+
2326
func QueryProviders() []*Provider {
2427
r := tunnel.RuleProviders()
2528
p := tunnel.Providers()
@@ -47,7 +50,7 @@ func QueryProviders() []*Provider {
4750
for _, p := range providers {
4851
updatedAt := time.Time{}
4952

50-
if s, ok := p.(P.UpdatableProvider); ok {
53+
if s, ok := p.(UpdatableProvider); ok {
5154
updatedAt = s.UpdatedAt()
5255
}
5356

0 commit comments

Comments
 (0)