interfacegen

package
v0.0.0-...-272d833 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(opt Options) ([]byte, error)

func MakeInterface

func MakeInterface(pkgName, name, comment string, methods []string) ([]byte, error)

Types

type Method

type Method struct {
	Code string
	Docs []string
}

type Options

type Options struct {
	Package      string
	File         string
	TargetStruct string
	PackageName  string
	Name         string
	Comment      string
}

func (*Options) GetFileSetAndDecls

func (o *Options) GetFileSetAndDecls() (*token.FileSet, []ast.Decl)

Jump to

Keyboard shortcuts

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