Skip to content

GoParser

reference
1 min readUpdated

Kind: Class

Source: atloria-monorepo/libs/parser-core/src/parsers/backend/go.parser.ts

Implements: IParser

Methods

MethodSignatureReturns
initializeinitialize(_config: ParserConfig)Promise<void>
canParsecanParse(filePath: string)boolean
parseFileparseFile(filePath: string, content: string)Promise<ParseResult>
parseFilesparseFiles(files: ParseFileInput[])Promise<ParseResult[]>
destroydestroy()Promise<void>

Properties

PropertyType
nameany
versionany
supportedPatternsany

Where it refuses work

  • GoParser stops the work with an early return when !source.trim().
  • GoParser stops the work with an early return when !rawPath.startsWith('/').
  • GoParser stops the work with an early return when seen.has(key).

When something fails

  • GoParser handles failure in 1 place: it turns it into a return value in all 1.

Was this page helpful?

Download as PDF