example

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: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Animal

type Animal struct{ Name string }

func ConvertAnimals

func ConvertAnimals(c Converter, input InputAnimals) []Animal

type Cat

type Cat struct{ Name string }

type Converter

type Converter interface {
	Convert(source Input) Output

	// used only in extend method
	ConvertDogs([]Dog) []Animal
	ConvertCats([]Cat) []Animal
}

goverter:converter goverter:extend ConvertAnimals

type Dog

type Dog struct{ Name string }

type Input

type Input struct {
	Animals InputAnimals
}

type InputAnimals

type InputAnimals struct {
	Cats []Cat
	Dogs []Dog
}

type Output

type Output struct {
	Animals []Animal
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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