toolshonnef.co/go/tools/go/ast/astutil Index | Files

package astutil

import "honnef.co/go/tools/go/ast/astutil"

Index

Functions

func GroupSpecs

func GroupSpecs(fset *token.FileSet, specs []ast.Spec) [][]ast.Spec

func IsBlank

func IsBlank(id ast.Expr) bool

isBlank returns whether id is the blank identifier "_". If id == nil, the answer is false.

func IsIdent

func IsIdent(expr ast.Expr, ident string) bool

func IsIntLiteral

func IsIntLiteral(expr ast.Expr, literal string) bool

func IsZero

func IsZero(expr ast.Expr) bool

Deprecated: use IsIntLiteral instead

func Preamble

func Preamble(f *ast.File) string

Source Files

util.go

Version
v0.1.0
Published
Dec 14, 2020
Platform
linux/amd64
Imports
3 packages
Last checked
27 minutes ago

Tools for package owners.