formatYaml is a utility function for stripping out tabs in multiline strings
(in string)
| 36 | |
| 37 | // formatYaml is a utility function for stripping out tabs in multiline strings |
| 38 | func FormatYaml(in string) []byte { |
| 39 | // removes any leading indentation(tabs) |
| 40 | in = strings.ReplaceAll(in, "\n\t", "\n ") |
| 41 | // converts remaining indentation |
| 42 | in = strings.ReplaceAll(in, "\t", " ") |
| 43 | return []byte(in) |
| 44 | } |
| 45 | |
| 46 | // ContextWithNewLogger create a new context with new logger |
| 47 | func ContextWithNewLogger() (context.Context, error) { |
no outgoing calls