Registry / utility / go-toolsmith-astcast

go-toolsmith-astcast

JSON →
library1.1.0gogounverified

Package astcast wraps type assertion operations to avoid nil pointer results.

go get github.com/go-toolsmith/astcast
INSTALL
IMPORT
SIG · GO-TOOLSMITH-ASTCA
G
go-toolsmith-astcast
utilitygov1.1.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

astcast
github.com/go-toolsmith/astcast

Safely cast an AST node to an Ident type.

package main import ( "fmt" "github.com/go-toolsmith/astcast" "go/ast" ) func main() { node := astcast.ToIdent(&ast.Ident{Name: "x"}) fmt.Println(node.Name) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.1.0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
go-toolsmith-astcast — go get go-toolsmith-astcast · libregistry