method

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Definition

type Definition struct {
	Parameters
	ID       string
	OriginID string
	Call     *jen.Statement
	Name     string
}

func Parse

func Parse(obj types.Object, opts *ParseOpts) (*Definition, error)

Parse parses an function into a Definition.

func (*Definition) Signature

func (m *Definition) Signature() xtype.Signature

type ParamType added in v1.1.0

type ParamType int
const (
	ParamsRequired ParamType = iota
	ParamsOptional
	ParamsNone
)

type Parameters

type Parameters struct {
	ReturnError          bool
	SelfAsFirstParameter bool
	TypeParams           bool
	Source               *xtype.Type
	Target               *xtype.Type
}

type ParseOpts

type ParseOpts struct {
	Converter         types.Type
	OutputPackagePath string

	ErrorPrefix     string
	Params          ParamType
	ConvFunction    bool
	AllowTypeParams bool
}

Jump to

Keyboard shortcuts

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