astbase

package
v0.87.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 12, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package astbase holds the one go/ast helper that two trees with different dependency budgets both need: framework/contracts, which must build without golang.org/x/tools, and internal/analyzers' astx, which sits on golang.org/x/tools/go/analysis. Neither can import the other, so the shared body lives here, importing nothing but go/ast. Everything in this package is behavior-neutral: it answers one syntactic question and decides nothing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RecvBaseName

func RecvBaseName(fd *ast.FuncDecl) string

RecvBaseName returns the identifier at the base of fd's receiver type (T or *T), or "", including when fd has no receiver. A generic receiver (T[P] or *T[P]) also returns "": the bracketed type is not an identifier, and no caller has ever needed the generic base, so the refusal is deliberate.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL