func formatSpec(specContents map[string]string) string {
	var output bytes.Buffer
	for k, v := range specContents {
		if strings.Index(v, "\n") > -1 {
			output.WriteString(fmt.Sprintf("%s:", k))
			lines := strings.Split(v, "\n")
			for i := range lines {
				if len(strings.TrimSpace(lines[i])) > 0 {
					output.WriteString(fmt.Sprintf("\n %s", lines[i]))
				}
			}
			output.WriteString("\n\n")
		} else {
			output.WriteString(fmt.Sprintf("%s: %s\n\n", k, v))
		}
	}
	return output.String()
}
// Assume multiline entries should be on seperate lines
Assume multiline entries should be on seperate lines
// Assume multiline entries should be on seperate lines
func formatSpec(specContents map[string]string) string {
	var output bytes.Buffer
	for k, v := range specContents {
		if strings.Index(v, "\n") > -1 {
			output.WriteString(fmt.Sprintf("%s:", k))
			lines := strings.Split(v, "\n")
			for i := range lines {
				if len(strings.TrimSpace(lines[i])) > 0 {
					output.WriteString(fmt.Sprintf("\n %s", lines[i]))
				}
			}
			output.WriteString("\n\n")
		} else {
			output.WriteString(fmt.Sprintf("%s: %s\n\n", k, v))
		}
	}
	return output.String()
}
func formatSpec ( specContents map [ string ] string ) string { var output bytes . Buffer for k , v := range specContents { if strings . Index ( v , " \n " ) > - 1 { output . WriteString ( fmt . Sprintf ( " " , k ) ) lines := strings . Split ( v , " \n " ) for i := range lines { if len ( strings . TrimSpace ( lines [ i ] ) ) > 0 { output . WriteString ( fmt . Sprintf ( " \n " , lines [ i ] ) ) } } output . WriteString ( " \n \n " ) } else { output . WriteString ( fmt . Sprintf ( " \n \n " , k , v ) ) } } return output . String ( ) }
Assume multiline entries should be on seperate lines
Assume multiline entries should be on seperate lines