chore: prevent toml double quotes

This commit is contained in:
andig 2023-06-09 17:45:25 +02:00
parent 422e6c72f9
commit ff64777bc6

View file

@ -36,7 +36,12 @@ func process(filepath string) error {
continue
}
fmt.Fprintf(pre, "%s = \"%s\"\n", key, val)
quote := `"`
if strings.Contains(val, quote) {
quote = `'`
}
fmt.Fprintf(pre, "%s = %s%s%s\n", key, quote, val, quote)
}
}