NewSave returns a Save middleware if the given configuration is not empty
(c *SaveConfig)
| 17 | |
| 18 | // NewSave returns a Save middleware if the given configuration is not empty |
| 19 | func NewSave(c *SaveConfig) core.Middleware { |
| 20 | var m core.Middleware |
| 21 | if !IsEmpty(c) { |
| 22 | m = &Save{*c} |
| 23 | } |
| 24 | |
| 25 | return m |
| 26 | } |
| 27 | |
| 28 | // Save the save middleware saves to disk a dump of the stdout and stderr after |
| 29 | // every execution of the process |