Expand description
§codegraph-go
Go parser for CodeGraph - extracts code entities and relationships from Go source files.
§Features
- Parse Go source files
- Extract functions, structs, interfaces, and packages
- Track relationships (calls, imports, interface implementations)
- Full integration with codegraph-parser-api
§Quick Start
use codegraph_go::GoParser;
use codegraph_parser_api::CodeParser;
use codegraph::CodeGraph;
use std::path::Path;
let mut graph = CodeGraph::in_memory()?;
let parser = GoParser::new();
let file_info = parser.parse_file(Path::new("main.go"), &mut graph)?;
println!("Parsed {} functions", file_info.functions.len());Structs§
- File
Info - Information about a successfully parsed file
- GoParser
- Go language parser implementing the CodeParser trait
- Parser
Config - Configuration for parser behavior
- Parser
Metrics - Metrics collected during parsing
- Project
Info - Aggregate information about a parsed project
Enums§
- Parser
Error - Errors that can occur during parsing
Traits§
- Code
Parser - Core trait that all language parsers must implement