Crate codegraph_go

Crate codegraph_go 

Source
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§

FileInfo
Information about a successfully parsed file
GoParser
Go language parser implementing the CodeParser trait
ParserConfig
Configuration for parser behavior
ParserMetrics
Metrics collected during parsing
ProjectInfo
Aggregate information about a parsed project

Enums§

ParserError
Errors that can occur during parsing

Traits§

CodeParser
Core trait that all language parsers must implement