(message string)
| 8 | ) |
| 9 | |
| 10 | func DeprecationWarning(message string) serpent.MiddlewareFunc { |
| 11 | return func(next serpent.HandlerFunc) serpent.HandlerFunc { |
| 12 | return func(i *serpent.Invocation) error { |
| 13 | _, _ = fmt.Fprintln(i.Stdout, "\n"+pretty.Sprint(DefaultStyles.Wrap, |
| 14 | pretty.Sprint( |
| 15 | DefaultStyles.Warn, |
| 16 | "DEPRECATION WARNING: This command will be removed in a future release."+"\n"+message+"\n"), |
| 17 | )) |
| 18 | return next(i) |
| 19 | } |
| 20 | } |
| 21 | } |