method

package
v1.5.1-2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 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
	OriginID string
	Call     *jen.Statement
	ID       string
	Package  string
	Name     string

	Generated  bool
	CustomCall *jen.Statement
}

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

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 {
	Location          string
	Converter         types.Type
	OutputPackagePath string

	ErrorPrefix     string
	Params          ParamType
	AllowTypeParams bool

	Generated  bool
	CustomCall *jen.Statement
}

Jump to

Keyboard shortcuts

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