mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-07-15 17:16:07 +00:00
style(sub): simplify a negated conjunction to satisfy staticcheck QF1001
golangci-lint (staticcheck QF1001) flagged the `!(a && b)` guard in expandSegment. Rewrite it via De Morgan's law to the equivalent `!a || !b` form so the linter passes; behavior is unchanged.
This commit is contained in:
@@ -135,7 +135,7 @@ func expandSegment(seg string, ctx remarkContext) (string, bool) {
|
||||
hasToken = true
|
||||
token := m[2 : len(m)-2]
|
||||
val := remarkVarValue(token, ctx)
|
||||
if val != "" && !(unlimitedDropTokens[token] && val == unlimitedMark) {
|
||||
if val != "" && (!unlimitedDropTokens[token] || val != unlimitedMark) {
|
||||
hasOtherValue = true
|
||||
}
|
||||
return val
|
||||
|
||||
Reference in New Issue
Block a user