samples

command
v0.9.29 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 14, 2023 License: MIT Imports: 9 Imported by: 0

README

Samples

Please play with the samples by editing them and running the main files:

  • main.go just a starter for different playgrounds
  • main-play.go general playground based on CopyFile and recursion
  • main-db-sample.go simulates DB transaction and money transfer

Run a default playground play mode:

go run main.go

Or run the DB based version to maybe better understand how powerful the automatic error string building is:

go run main.go -mode db

Documentation

Overview

Package main includes samples of err2. It works as a playground for users of the err2 package to test how different APIs work. We suggest you take your favorite editor and start to play with the main.go file. The comments on it guide you.

We have only a few examples built over the CopyFile and callRecur functions, but with them you can try all the important APIs from err2, try, and assert. Just follow the comments and try suggested things :-)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL