Source

This example runs in your browser using wasm, so there are some limitations:

  • You cannot use import "package" including standard library.
  • go-stringer-gen is not supported.

The opinions baked into the wasm binary are:

  • Business logic lives in a struct named with suffix Op.
  • Chained methods are [validate] -> [authorize] -> [process] -> [handle].
  • Errors are not wrapped (wrapping requires import "fmt" which is beyond the wasm limitation above)
  • All *Op structs are composed together into a public interface Service.

Generated code