- use Println to print newline instead of custom format - suppress some errors to make my IDE and linters happier - use res.Assert() with icmd.Expected{} where possible to make assertions not depend on newline / whitespace randomness - use apiClient instead of client for the API client to prevent shadowing imports. - use dockerCLI with Go's standard camelCase casing. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
19 lines
293 B
Go
19 lines
293 B
Go
package hooks
|
|
|
|
import (
|
|
"fmt"
|
|
"io"
|
|
|
|
"github.com/morikuni/aec"
|
|
)
|
|
|
|
func PrintNextSteps(out io.Writer, messages []string) {
|
|
if len(messages) == 0 {
|
|
return
|
|
}
|
|
_, _ = fmt.Fprintln(out, aec.Bold.Apply("\nWhat's next:"))
|
|
for _, n := range messages {
|
|
_, _ = fmt.Fprintln(out, " ", n)
|
|
}
|
|
}
|