import { type Coverage } from '../analyzers/tools/coverage';
import type { LanguageSupport } from './types';
/**
 * Pure parser for `go.mod`, extracting module paths declared in
 * `require` blocks WITHOUT a `// indirect` marker. Those are the
 * user's direct deps — the ones that show up as Snyk top-levels.
 *
 * Handles both syntaxes:
 *   require foo.com/bar v1.0                        (single-line)
 *   require ( foo.com/bar v1.0                      (block)
 *             baz.com/qux v2.0 // indirect )        (indirect-marked)
 *
 * Lines with `// indirect` (or `//indirect`) are skipped since those
 * were added by `go mod tidy` to pin transitive versions, not because
 * the user declared them. Go's direct/indirect distinction maps
 * cleanly onto the top-level concept.
 */
export declare function parseGoModDirectDeps(raw: string): string[];
/**
 * Pure parser for `go mod graph`, returning a per-module index of the
 * top-level manifest deps (root's direct children, filtered against
 * `go.mod`'s direct-dep list when supplied) that transitively pull
 * each module.
 *
 * `go mod graph` output is line-oriented: `<src> <dst>` where each
 * token is `module@version` except the root module which appears
 * without `@version`. The root's direct deps are the BFS seeds;
 * attribution collapses at the module-name level so the same package
 * appearing at multiple versions maps to a single name.
 *
 * When `directDeps` is supplied, seeds are intersected with that set —
 * excludes indirect-but-in-graph modules (every dependency of a
 * direct dep is also a direct child of root in the graph). Without
 * this filter, Go projects with 5 direct + 30 indirect deps would
 * show 35 "top-levels," inflating attribution.
 */
export declare function buildGoTopLevelDepIndex(raw: string, directDeps?: ReadonlyArray<string>): Map<string, string[]>;
/**
 * Go coverprofile:
 *   mode: set
 *   pkg/path/file.go:5.2,10.1 3 1
 *
 * Each line: `file:startLine.col,endLine.col numStatements count`. A
 * block is covered iff `count > 0`.
 */
export declare function parseGoCoverProfile(raw: string, sourceFile: string, cwd: string): Coverage;
/**
 * Capture Go module specifiers from source text. Handles both single-line
 * `import "fmt"` and parenthesized multi-line blocks, including aliased
 * imports. Exported for unit tests; the imports capability batches it
 * across all .go files in the repo.
 */
export declare function extractGoImportsRaw(content: string): string[];
/**
 * Resolve a Go import specifier to the in-project package directory,
 * or null for stdlib / external modules. A resolved edge target is a
 * directory (not a file), which naturally dead-ends the import-graph
 * BFS. Exported for unit tests.
 */
export declare function resolveGoImportRaw(_fromFile: string, spec: string, cwd: string): string | null;
export declare const go: LanguageSupport;
//# sourceMappingURL=go.d.ts.map