; Go pattern detection queries
; Captures: @node (pattern site), @name (identifier)

; Interface type definition
(type_declaration
  (type_spec
    name: (type_identifier) @name
    type: (interface_type))) @node

; Goroutine launch
(go_statement
  (call_expression
    function: (identifier) @name)) @node

; Channel creation: make(chan T)
(call_expression
  function: (identifier) @name
  (#eq? @name "make")) @node

; sync primitives (field of type sync.Mutex, sync.WaitGroup, etc.)
(field_declaration
  type: (qualified_type
    package: (package_identifier) @_pkg
    name: (type_identifier) @name
    (#eq? @_pkg "sync"))) @node
