mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 10:25:42 +03:00
When serializing msgpack, only consider codec tag
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`.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
package structs
|
||||
|
||||
//go:generate codecgen -c github.com/hashicorp/go-msgpack/codec -d 102 -t codegen_generated -o structs.generated.go structs.go
|
||||
//go:generate codecgen -c github.com/hashicorp/go-msgpack/codec -st codec -d 102 -t codegen_generated -o structs.generated.go structs.go
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
||||
Reference in New Issue
Block a user