tags

command
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2026 License: PostgreSQL Imports: 11 Imported by: 0

Documentation

Overview

This tool modifies the types in our API design files to add JSON struct tags. We're doing this programmatically because there are many fields to modify and naming them and keeping them in sync with the required fields is error-prone.

This main file takes a list of file paths to modify. It will then add g.Meta("struct:tag:json", "<field name and optional omitempty>") calls to every g.Attribute and g.ErrorName call that's part of a g.Type or g.ResultType. If the field is not listed in the type's g.Required, the struct tag will have omitempty.

Jump to

Keyboard shortcuts

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