Source
This example runs in your browser using wasm, so there are some limitations:
- You cannot use
import "package"including standard library.go-stringer-genis 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
*Opstructs are composed together into a public interfaceService.