If we have a field defined as a slice and using space as a delimiter, say:
ExtraArgs []string `ini:"extra_args" delim:" "`
An entry in the ini file formatted as:
Correctly generates a slice of three string elements, "aaa", "bbb", and "ccc".
However, things get complicated if we need one of the elements to contain a space. I tried the following constructs without success:
extra_args = aaa "bbb and space" ccc
extra_args = aaa bbb\ and\ space ccc
extra_args = """
aaa
bbb and space
ccc"""
And neither seems to work.
Ideally, the delimiter shouldn't be matched inside quoted strings of it it's quoted with a backslash.
If we have a field defined as a slice and using space as a delimiter, say:
An entry in the ini file formatted as:
Correctly generates a slice of three string elements, "aaa", "bbb", and "ccc".
However, things get complicated if we need one of the elements to contain a space. I tried the following constructs without success:
And neither seems to work.
Ideally, the delimiter shouldn't be matched inside quoted strings of it it's quoted with a backslash.