Merge pull request #7578 from hashicorp/b-fix-structs-generation

fix codegen for ugorji/go
This commit is contained in:
Mahmood Ali 2020-03-31 21:33:27 -04:00 committed by GitHub
commit ee637db97f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 2 deletions

6
client/structs/generate.sh Executable file
View 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

View file

@ -1,6 +1,6 @@
package structs
//go:generate codecgen -d 102 -t codec_generated -o structs.generated.go structs.go
//go:generate ./generate.sh
import (
"errors"

View file

@ -2,4 +2,5 @@
set -e
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