astutils

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package astutils provides utility functions for working with AST nodes

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FuncSignatureIs

func FuncSignatureIs(funcDecl *ast.FuncDecl, wantName string, wantParametersTypes, wantResultsTypes []string) bool

FuncSignatureIs returns true if the given func decl satisfies a signature characterized by the given name, parameters types and return types; false otherwise.

Example: to check if a function declaration has the signature Foo(int, string) (bool,error) call to FuncSignatureIs(funcDecl,"Foo",[]string{"int","string"},[]string{"bool","error"})

Types

This section is empty.

Jump to

Keyboard shortcuts

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