aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorAlexander Kiryukhin <alexander@kiryukhin.su>2019-03-27 02:47:49 +0300
committerGitHub <noreply@github.com>2019-03-27 02:47:49 +0300
commitd4c697cf3a7f1abcdb0b394a84e7df95a4fb03b0 (patch)
tree9b758fa1afb95657953b84d94776abe6e19cdb4a /README.md
parentd45d913c9e0d088f339c007f14d2fcaa7b9c8c74 (diff)
Update README.md
Diffstat (limited to 'README.md')
-rwxr-xr-xREADME.md40
1 files changed, 20 insertions, 20 deletions
diff --git a/README.md b/README.md
index 0ada43f..060d797 100755
--- a/README.md
+++ b/README.md
@@ -54,26 +54,26 @@ Default policy:
#### Example of run policies
```go
- r.Go(func(ctx context.Context) error {
- // If this routine produce no error - it just restarts
- // If it returns error - all other routines will shutdown (because context cancels)
- }, rutina.RestartIfDone, rutina.ShutdownIfFail)
-
- r.Go(func(ctx context.Context) error {
- // If this routine produce no error - it just completes
- // If it returns error - all other routines will shutdown (because context cancels)
- }, rutina.DoNothingIfDone, rutina.ShutdownIfFail)
-
- r.Go(func(ctx context.Context) error {
- // If this routine produce no error - all other routines will shutdown (because context cancels)
- // If it returns error - it will be restarted
- }, rutina.RestartIfFail)
-
- r.Go(func(ctx context.Context) error {
- // If this routine stopped by any case - all other routines will shutdown (because context cancels)
- }, rutina.ShutdownIfDone)
-
- r.ListenOsSignals() // Shutdown all routines by OS signal
+r.Go(func(ctx context.Context) error {
+ // If this routine produce no error - it just restarts
+ // If it returns error - all other routines will shutdown (because context cancels)
+}, rutina.RestartIfDone, rutina.ShutdownIfFail)
+
+r.Go(func(ctx context.Context) error {
+ // If this routine produce no error - it just completes
+ // If it returns error - all other routines will shutdown (because context cancels)
+}, rutina.DoNothingIfDone, rutina.ShutdownIfFail)
+
+r.Go(func(ctx context.Context) error {
+ // If this routine produce no error - all other routines will shutdown (because context cancels)
+ // If it returns error - it will be restarted
+}, rutina.RestartIfFail)
+
+r.Go(func(ctx context.Context) error {
+ // If this routine stopped by any case - all other routines will shutdown (because context cancels)
+}, rutina.ShutdownIfDone)
+
+r.ListenOsSignals() // Shutdown all routines by OS signal
```
### Wait routines to complete