diff --git a/rpc/cty_encode.go b/rpc/cty_encode.go index 175728e88..429abc4db 100644 --- a/rpc/cty_encode.go +++ b/rpc/cty_encode.go @@ -4,16 +4,10 @@ package rpc import ( - "encoding/gob" - "github.com/zclconf/go-cty/cty" "github.com/zclconf/go-cty/cty/json" ) -// Test that cty types implement the gob.GobEncoder interface. -// Support for encoding/gob was removed in github.com/zclconf/go-cty@v1.11.0. -var _ gob.GobEncoder = cty.Value{} - // cty.Value is does not know how to encode itself through the wire so we // transform it to bytes. func encodeCTYValues(config []interface{}) ([]interface{}, error) { diff --git a/rpc/init.go b/rpc/init.go index 6e8b49b85..de598402b 100644 --- a/rpc/init.go +++ b/rpc/init.go @@ -9,7 +9,16 @@ underpins the packer server that all plugins must implement. */ package rpc -import "encoding/gob" +import ( + "encoding/gob" + + "github.com/zclconf/go-cty/cty" +) + +// Test that cty types implement the gob.GobEncoder interface. +// Support for encoding/gob was removed in github.com/zclconf/go-cty@v1.11.0. +// Refer to issue ... +var _ gob.GobEncoder = cty.Value{} func init() { gob.Register(new(map[string]string))