method

package
v0.0.0-...-ca4481b Latest Latest
Warning

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

Go to latest
Published: Feb 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
	ID                 string
	Call               *jen.Statement
	Name               string
	ReturnTypeOriginID 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

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

type Parameters

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

type ParseOpts

type ParseOpts struct {
	Converter         types.Type
	OutputPackagePath string

	ErrorPrefix  string
	ConvFunction bool
	Params       ParamType
}

Jump to

Keyboard shortcuts

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