Remove incorrect warning

This commit is contained in:
世界
2022-08-09 16:36:17 +08:00
parent 79a4b18ec7
commit 0e6b4df8f1
6 changed files with 14 additions and 22 deletions

View File

@@ -9,15 +9,9 @@ import (
F "github.com/sagernet/sing/common/format"
)
var (
warnUserOnNonLinux = warning.New(
func() bool { return !C.IsLinux },
"rule item `user` is only supported on Linux",
)
warnUserOnCGODisabled = warning.New(
func() bool { return !C.CGO_ENABLED },
"rule item `user` is only supported with CGO enabled, rebuild with CGO_ENABLED=1",
)
var warnUserOnNonLinux = warning.New(
func() bool { return !C.IsLinux },
"rule item `user` is only supported on Linux",
)
var _ RuleItem = (*UserItem)(nil)
@@ -29,7 +23,6 @@ type UserItem struct {
func NewUserItem(users []string) *UserItem {
warnUserOnNonLinux.Check()
warnUserOnCGODisabled.Check()
userMap := make(map[string]bool)
for _, protocol := range users {
userMap[protocol] = true