Package Usage: go: github.com/openacid/must
Package must provides "design-by-contract" support.
With "go build -tags debug" it enables bug checking statement.
If a bug is found it panics.
Without "-tags debug", by default "go build" ignores bug checking statement
by emitting an "NOP" instruction.
Example: a function that right-shift an integer expect the input "a" is 8*n:
With the above code:
`go run` just silently ignores the expectation and print the result.
`go run -tags debug` would panic because `a` does not satisfy the input
expectation.
Since 0.1.0
4 versions
Latest release: almost 6 years ago
4 dependent packages
View more package details: https://packages.ecosystem.code.gouv.fr/registries/proxy.golang.org/packages/github.com/openacid/must