chore: prevent toml double quotes
This commit is contained in:
parent
422e6c72f9
commit
ff64777bc6
1 changed files with 6 additions and 1 deletions
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue