| Crates.io | codegraph-go |
| lib.rs | codegraph-go |
| version | 0.1.3 |
| created_at | 2025-11-06 03:46:01.501064+00 |
| updated_at | 2026-01-02 00:25:42.149075+00 |
| description | Go parser for CodeGraph - extracts code entities and relationships from Go source files |
| homepage | |
| repository | https://github.com/anvanster/codegraph |
| max_upload_size | |
| id | 1919030 |
| size | 92,509 |
Go parser for CodeGraph - extracts code entities and relationships from Go source files.
codegraph-parser-apiuse codegraph::CodeGraph;
use codegraph_parser_api::CodeParser;
use codegraph_go::GoParser;
use std::path::Path;
fn main() -> Result<(), Box<dyn std::error::Error>> {
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());
println!("Parsed {} structs", file_info.classes.len());
Ok(())
}
Apache-2.0