From fd873b8811f7d767c83a3cdce747a4da62ae6923 Mon Sep 17 00:00:00 2001 From: Adrien Delorme Date: Wed, 4 Nov 2020 13:20:05 +0100 Subject: [PATCH] Referenceable: explain a bit more of the whys --- hcl2template/addrs/referenceable.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hcl2template/addrs/referenceable.go b/hcl2template/addrs/referenceable.go index 8c4925c40..8caec1241 100644 --- a/hcl2template/addrs/referenceable.go +++ b/hcl2template/addrs/referenceable.go @@ -3,6 +3,8 @@ package addrs // Referenceable is an interface implemented by all address types that can // appear as references in configuration language expressions. type Referenceable interface { + // referenceableSigil is private to ensure that all Referenceables are + // implentented in this current package. For now this does nothing. referenceableSigil() // String produces a string representation of the address that could be @@ -11,6 +13,8 @@ type Referenceable interface { String() string } +// referenceable is an empty struct that implements Referenceable, add it to +// your Referenceable struct so that it can be recognized as such. type referenceable struct { }