aboutsummaryrefslogtreecommitdiff
path: root/adapter_ecmascript.go
diff options
context:
space:
mode:
authorFuwn <[email protected]>2026-02-11 11:14:30 +0000
committerFuwn <[email protected]>2026-02-11 11:14:30 +0000
commit2d0a6ba5fc5fcdd8a9fcf4e7121ed62072fbc4f9 (patch)
treefe277ba5475480fd38e44a6866bb1c2c70cb633d /adapter_ecmascript.go
parentfeat: Support JSON configuration file (diff)
downloadiku-2d0a6ba5fc5fcdd8a9fcf4e7121ed62072fbc4f9.tar.xz
iku-2d0a6ba5fc5fcdd8a9fcf4e7121ed62072fbc4f9.zip
style: Fix lint warnings
Diffstat (limited to 'adapter_ecmascript.go')
-rw-r--r--adapter_ecmascript.go9
1 files changed, 2 insertions, 7 deletions
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"):