comments

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Converter

type Converter struct {
	Name    string
	Config  ConverterConfig
	Methods MethodMapping
}

Converter defines a converter that was marked with converterMarker.

func ParseDocs

func ParseDocs(pattern string) ([]Converter, error)

ParseDocs parses the docs for the given pattern.

type ConverterConfig

type ConverterConfig struct {
	Name             string
	ExtendMethods    []string
	CaseInsensitive  bool
	IgnoreUnexported bool
}

ConverterConfig contains settings that can be set via comments.

type Method

type Method struct {
	IgnoredFields map[string]struct{}
	NameMapping   map[string]string
	// target to source
	IdentityMapping map[string]struct{}
}

Method contains settings that can be set via comments.

type MethodMapping

type MethodMapping map[string]Method

MethodMapping a mapping between method name and method.

Jump to

Keyboard shortcuts

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