Usually, when your program consists of several routines (i.e.: http server, metrics server and os signals subscriber) and you want to stop all routines when one of them ends (i.e.: by TERM os signal in signal subscriber).
## Usage
### New instance
`r := rutina.New()`
or with options (see below):
`r := rutina.New(...Option)` or `r.WithOptions(...Option)`
### Start new routine
```
r.Go(func (ctx context.Context) error {
...do something...
})
```
### Wait routines to complete
```
err := r.Wait()
```
Here err = first error in any routine
## Options
### Usage options
`r := rutina.New(option1, option2, ...)`
or
```
r := rutina.New()
r = r.WithOptions(option1, option2, ...) // Returns new instance of Rutina!
```
### Logger
`rutina.WithLogger(logger log.Logger) Option` or `rutina.WithStdLogger() Option`
### Custom context
`rutina.WithContext(ctx context.Context) Option`
### Cancel only by errors
`rutina.WithCancelByError() Option`
If this option set, rutina doesnt cancel context if routine completed without error.