Merge pull request #7578 from hashicorp/b-fix-structs-generation
fix codegen for ugorji/go
This commit is contained in:
commit
ee637db97f
6
client/structs/generate.sh
Executable file
6
client/structs/generate.sh
Executable file
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
codecgen -d 102 -t codegen_generated -o structs.generated.go structs.go
|
||||||
|
sed -i'' -e 's|"github.com/ugorji/go/codec|"github.com/hashicorp/go-msgpack/codec|g' structs.generated.go
|
|
@ -1,6 +1,6 @@
|
||||||
package structs
|
package structs
|
||||||
|
|
||||||
//go:generate codecgen -d 102 -t codec_generated -o structs.generated.go structs.go
|
//go:generate ./generate.sh
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
|
|
@ -2,4 +2,5 @@
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
FILES="$(ls ./*.go | grep -v -e _test.go -e .generated.go | tr '\n' ' ')"
|
FILES="$(ls ./*.go | grep -v -e _test.go -e .generated.go | tr '\n' ' ')"
|
||||||
codecgen -d 100 -t codec_generated -o structs.generated.go ${FILES}
|
codecgen -d 100 -t codegen_generated -o structs.generated.go ${FILES}
|
||||||
|
sed -i'' -e 's|"github.com/ugorji/go/codec|"github.com/hashicorp/go-msgpack/codec|g' structs.generated.go
|
||||||
|
|
Loading…
Reference in a new issue