astutil

package
v0.0.0-...-3621051 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package astutil provides shared utilities for AST manipulation and string formatting.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExpandFieldListTypes

func ExpandFieldListTypes(fields []*dst.Field, typeFormatter func(dst.Expr) string) []string

ExpandFieldListTypes expands a field list into individual type strings. For fields with multiple names (e.g., "a, b int"), outputs the type once per name. For unnamed fields, outputs the type once.

func ExprToString

func ExprToString(_ *token.FileSet, expr dst.Expr) string

ExprToString renders a dst.Expr to Go code. This function converts DST expressions back to their string representation.

func StringifyExpr

func StringifyExpr(expr dst.Expr) string

StringifyExpr converts a DST expression to its string representation.

Types

This section is empty.

Jump to

Keyboard shortcuts

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