@@ -45,6 +45,14 @@ func TransformTemplate(tpl *templateapi.Template, client client.TemplateConfigsN
45
45
return result , nil
46
46
}
47
47
48
+ func formatString (out io.Writer , tab , s string ) {
49
+ labelVals := strings .Split (s , "\n " )
50
+
51
+ for _ , lval := range labelVals {
52
+ fmt .Fprintf (out , fmt .Sprintf ("%s%s\n " , tab , lval ))
53
+ }
54
+ }
55
+
48
56
// DescribeGeneratedTemplate writes a description of the provided template to out.
49
57
func DescribeGeneratedTemplate (out io.Writer , input string , result * templateapi.Template , baseNamespace string ) {
50
58
qualifiedName := localOrRemoteName (result .ObjectMeta , baseNamespace )
@@ -64,13 +72,14 @@ func DescribeGeneratedTemplate(out io.Writer, input string, result *templateapi.
64
72
fmt .Fprintf (out , " %s\n " , name )
65
73
fmt .Fprintf (out , " ---------\n " )
66
74
if len (description ) > 0 {
67
- fmt . Fprintf (out , " %s \n " , description )
75
+ formatString (out , " " , description )
68
76
fmt .Fprintln (out )
69
77
}
70
78
if len (message ) > 0 {
71
- fmt . Fprintf (out , " %s \n " , message )
79
+ formatString (out , " " , message )
72
80
fmt .Fprintln (out )
73
81
}
82
+ fmt .Fprintln (out )
74
83
}
75
84
76
85
if warnings := result .Annotations [app .GenerationWarningAnnotation ]; len (warnings ) > 0 {
0 commit comments