From 2d0a6ba5fc5fcdd8a9fcf4e7121ed62072fbc4f9 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Wed, 11 Feb 2026 11:14:30 +0000 Subject: style: Fix lint warnings --- adapter_ecmascript.go | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'adapter_ecmascript.go') diff --git a/adapter_ecmascript.go b/adapter_ecmascript.go index 29f99b7..78117ea 100644 --- a/adapter_ecmascript.go +++ b/adapter_ecmascript.go @@ -127,13 +127,8 @@ func classifyEcmaScriptStatement(trimmedLine string) (string, bool, bool) { classified = classified[7:] } - if strings.HasPrefix(classified, "async ") { - classified = classified[6:] - } - - if strings.HasPrefix(classified, "declare ") { - classified = classified[8:] - } + classified = strings.TrimPrefix(classified, "async ") + classified = strings.TrimPrefix(classified, "declare ") switch { case ecmaScriptStatementHasPrefix(classified, "function"): -- cgit v1.2.3