diff options
| author | Fuwn <[email protected]> | 2026-02-11 11:14:30 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-02-11 11:14:30 +0000 |
| commit | 2d0a6ba5fc5fcdd8a9fcf4e7121ed62072fbc4f9 (patch) | |
| tree | fe277ba5475480fd38e44a6866bb1c2c70cb633d /adapter_ecmascript.go | |
| parent | feat: Support JSON configuration file (diff) | |
| download | iku-2d0a6ba5fc5fcdd8a9fcf4e7121ed62072fbc4f9.tar.xz iku-2d0a6ba5fc5fcdd8a9fcf4e7121ed62072fbc4f9.zip | |
style: Fix lint warnings
Diffstat (limited to 'adapter_ecmascript.go')
| -rw-r--r-- | adapter_ecmascript.go | 9 |
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"): |