Hi, I'd like to point you to a go tool that implements contracts (pre and postconditions) as part of documentation. The tool translates the contracts into code by adding it to the function body. It can also automatically remove the checks once you don't need them any more (e.g. in production).
Here is the repository: https://github.com/Parquery/gocontracts We are thinking about implementing the invariants in a similar way. Please have a look at this post if you'd like to discuss the details or contribute: https://groups.google.com/forum/?hl=uk&nomobile=true#!topic/golang-nuts/zKQA0Lh116k -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.