Back to directory

goverter

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

goverter

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.

More in CLI tools

See all 181
  • grev

    github.com

    A set of Unix coreutils-style filters — grep, sort, cut and more — that answer a plain-language question about each record instead of matching a pattern, using a small decision model.

  • A Node.js script that exports a Google Doc to HTML and CSS with high fidelity, preserving headings, spacing, alignment, bullet lists, images and right-to-left text.

  • gpusched

    github.com

    A VRAM-aware GPU job scheduler for a single machine: declare how much memory each shell command needs, and it places jobs the moment a GPU has room and reports when a guess was wrong.