Skip to content

Setting: name ‚Äč

name NAME can be defined as CLI argument or conversion comment.

name instructs goverter to use the given name for the generated struct. By default goverter will use the interface name and append Impl at the end.

package example

// goverter:converter
// goverter:name RenamedConverter
type Converter interface {
	Convert(Input) Output

type Input struct {
	Name string
type Output struct {
	Name string
// Code generated by, DO NOT EDIT.
//go:build !goverter

package generated

import namestruct ""

type RenamedConverter struct{}

func (c *RenamedConverter) Convert(source namestruct.Input) namestruct.Output {
	var exampleOutput namestruct.Output
	exampleOutput.Name = source.Name
	return exampleOutput