Migration: go1.21

This commit is contained in:
Dreamacro
2023-08-13 21:44:16 +08:00
parent e5668687ab
commit cb8c732375
10 changed files with 22 additions and 26 deletions

View File

@ -9,13 +9,9 @@ import (
"github.com/Dreamacro/clash/log"
)
var printMarkWarnOnce sync.Once
func printMarkWarn() {
printMarkWarnOnce.Do(func() {
log.Warnln("Routing mark on socket is not supported on current platform")
})
}
var printMarkWarn = sync.OnceFunc(func() {
log.Warnln("Routing mark on socket is not supported on current platform")
})
func bindMarkToDialer(mark int, dialer *net.Dialer, _ string, _ net.IP) {
printMarkWarn()