implements

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Method

func Method(t types.Type, name string, paramTypes []string, returnTypes []string) bool

Method returns true if the given type is a named structure that implements the specified method signature. Since you might be referencing types that are hard to look up in the AST packages info, you can just supply the qualified names of the types for your params and return values (e.g. "io.Reader" or "http.Client").

func Signature

func Signature(method *types.Func, name string, paramTypes []string, resultTypes []string) bool

Signature accepts a single method and determines whether or not it has the same name, parameter types, and return types as what you provide. Since you might be referencing types that are hard to look up in the AST packages info, you can just supply the qualified names of the types for your params and return values (e.g. "io.Reader" or "http.Client").

Types

This section is empty.

Jump to

Keyboard shortcuts

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