github.com/hashicorp/hcl/v2@v2.20.0/hcldec/gob.go (about) 1 // Copyright (c) HashiCorp, Inc. 2 // SPDX-License-Identifier: MPL-2.0 3 4 package hcldec 5 6 import ( 7 "encoding/gob" 8 ) 9 10 func init() { 11 // Every Spec implementation should be registered with gob, so that 12 // specs can be sent over gob channels, such as using 13 // github.com/hashicorp/go-plugin with plugins that need to describe 14 // what shape of configuration they are expecting. 15 gob.Register(ObjectSpec(nil)) 16 gob.Register(TupleSpec(nil)) 17 gob.Register((*AttrSpec)(nil)) 18 gob.Register((*LiteralSpec)(nil)) 19 gob.Register((*ExprSpec)(nil)) 20 gob.Register((*BlockSpec)(nil)) 21 gob.Register((*BlockListSpec)(nil)) 22 gob.Register((*BlockSetSpec)(nil)) 23 gob.Register((*BlockMapSpec)(nil)) 24 gob.Register((*BlockLabelSpec)(nil)) 25 gob.Register((*DefaultSpec)(nil)) 26 }