MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / is_exported

Method is_exported

codegraph-kernel/src/go.rs:346–352  ·  view source on GitHub ↗

goExtractor.isExported: uppercase first letter of the name field (a var_spec / const_spec's first name included).

(&self, node: Node)

Source from the content-addressed store, hash-verified

344 /// goExtractor.isExported: uppercase first letter of the name field (a
345 /// var_spec / const_spec's first name included).
346 fn is_exported(&self, node: Node) -> bool {
347 if let Some(name_node) = node.child_by_field_name("name") {
348 let text = self.text(name_node);
349 return text.as_bytes().first().map(|b| b.is_ascii_uppercase()).unwrap_or(false);
350 }
351 false
352 }
353
354 /// extractGoReturnType (languages/go.ts).
355 fn return_type_of(&self, node: Node) -> Option<String> {

Callers 4

extract_functionMethod · 0.45
extract_methodMethod · 0.45
extract_type_aliasMethod · 0.45
extract_variableMethod · 0.45

Calls 3

mapMethod · 0.80
textMethod · 0.65
firstMethod · 0.45

Tested by

no test coverage detected