938e916d9c
When serializing structs with msgpack, only consider type tags of `codec`. Hashicorp/go-msgpack (based on ugorji/go) defaults to interpretting `codec` tag if it's available, but falls to using `json` if `codec` isn't present. This behavior is surprising in cases where we want to serialize json differently from msgpack, e.g. serializing `ConsulExposeConfig`.
12 lines
251 B
Bash
Executable file
12 lines
251 B
Bash
Executable file
#!/bin/bash
|
|
set -e
|
|
|
|
FILES="$(ls ./*.go | grep -v -e _test.go -e .generated.go | tr '\n' ' ')"
|
|
codecgen \
|
|
-c github.com/hashicorp/go-msgpack/codec \
|
|
-st codec \
|
|
-d 100 \
|
|
-t codegen_generated \
|
|
-o structs.generated.go \
|
|
${FILES}
|