Go


Glue supports go as a code generation target, allowing you to generate Go structs and enums from Glue models.

Simply run:

shell

#Configuration

You can configure the emitted package name:

yaml

#Example

For this Glue spec:

glue

...generating Go...

shell

...will produce code similar to:

go

#Notes

  • Optional fields are emitted as pointers and include ,omitempty in JSON tags.
  • Unions are emitted as interface{}.
  • Record<K, V> is emitted as map[K]V.
  • Anonymous model type atoms are currently not supported in Go code generation.