Migration: go 1.18

This commit is contained in:
MetaCubeX
2022-03-17 01:51:28 +08:00
parent 609d69191a
commit e194efcecb
5 changed files with 8 additions and 3 deletions

View File

@ -116,7 +116,7 @@ func (f *Fallback) Unwrap(metadata *C.Metadata) C.Proxy {
func (f *Fallback) proxies(touch bool) []C.Proxy {
elm, _, _ := f.single.Do(func() (any, error) {
return getProvidersProxies(f.providers, touch), nil
return getProvidersProxies(f.providers, touch, f.filter), nil
})
return elm.([]C.Proxy)

View File

@ -79,7 +79,7 @@ func (s *Selector) Set(name string) error {
}
// Unwrap implements C.ProxyAdapter
func (s *Selector) Unwrap(metadata *C.Metadata) C.Proxy {
func (s *Selector) Unwrap(*C.Metadata) C.Proxy {
return s.selectedProxy(true)
}

View File

@ -66,7 +66,7 @@ func (u *URLTest) ListenPacketContext(ctx context.Context, metadata *C.Metadata,
}
// Unwrap implements C.ProxyAdapter
func (u *URLTest) Unwrap(metadata *C.Metadata) C.Proxy {
func (u *URLTest) Unwrap(*C.Metadata) C.Proxy {
return u.fast(true)
}