github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/jobspec2/addrs/referenceable.go (about) 1 package addrs 2 3 // Referenceable is an interface implemented by all address types that can 4 // appear as references in configuration language expressions. 5 type Referenceable interface { 6 // referenceableSigil is private to ensure that all Referenceables are 7 // implentented in this current package. For now this does nothing. 8 referenceableSigil() 9 10 // String produces a string representation of the address that could be 11 // parsed as a HCL traversal and passed to ParseRef to produce an identical 12 // result. 13 String() string 14 } 15 16 // referenceable is an empty struct that implements Referenceable, add it to 17 // your Referenceable struct so that it can be recognized as such. 18 type referenceable struct { 19 } 20 21 func (r referenceable) referenceableSigil() { 22 }