# goverter

A code generator for Go that produces type-safe struct converters from interface definitions, avoiding reflection at runtime.

goverter is a code-generation tool for Go that creates type-safe converters between structs. A developer declares an interface describing the conversion, and goverter generates the implementation, so no reflection is used at runtime.

It automatically converts built-in types such as slices, maps, named and primitive types, pointers, and structs with matching fields, supports enums, and performs deep copies by default with an option for shallow copying. Custom converter methods can be plugged in for cases the generator cannot infer, and it reports clear errors when a target struct has unmapped fields or when a conversion would lose information.

It is distributed as a command-line tool with semantic versioning and is written in Go under the MIT license.

Website: https://goverter.jmattheis.de/
