Documentation ¶
Overview ¶
Package vegr (hel...vegr - the road to helheim) is a place to store library calls that hel mocks need in order to work. We put any non-trivial logic here so that it can have tests, and then allow hel mocks to import and use this properly-tested logic.
Since this is only intended for use by generated code, it eagerly panics for obviously incorrect usage.
Index ¶
Constants ¶
const ( // MinVersion is the minimum version of hel that this library can work with. // Any version below v0.{MinVersion}.0 uses legacy code that is no longer // supported in this version of vegr. MinVersion = 0 // MaxVersion is the maximum version of hel that this library can work with. // Any version above v0.{MaxVersion}.* may rely on new features in vegr that // don't exist in this version. MaxVersion = Version // Version is the current version of hel. Version = 6 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EnforceVersion ¶ added in v0.6.0
type EnforceVersion uint
EnforceVersion is used by generated code to ensure that runtime code supports the version of the generated code. It relies on uint underflow to break if the version of hel that it was generated with is not supported by the imported version of this library.
The runtime can be updated with:
go get -u git.sr.ht/~nelsam/hel
The generated code can be updated with:
hel
Credit goes to github.com/protocol-buffers/protobuf-go for this idea.