1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

Doc: Fixed a bit of havoc which appears in go docs (#2105)

Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
This commit is contained in:
Paul Dee
2023-03-01 16:17:07 +01:00
committed by GitHub
parent dde7e5daf7
commit 48a504839d
4 changed files with 28 additions and 25 deletions

View File

@ -31,10 +31,12 @@ func StripQuotes(s string) string {
}
// ParseQuotedTxt returns the individual strings of a combined quoted string.
// `foo` -> []string{"foo"}
// `"foo"` -> []string{"foo"}
// `"foo" "bar"` -> []string{"foo", "bar"}
// `"f"oo" "bar"` -> []string{`f"oo`, "bar"}
//
// `foo` -> []string{"foo"}
// `"foo"` -> []string{"foo"}
// `"foo" "bar"` -> []string{"foo", "bar"}
// `"f"oo" "bar"` -> []string{`f"oo`, "bar"}
//
// NOTE: It is assumed there is exactly one space between the quotes.
// NOTE: This doesn't handle escaped quotes.
// NOTE: You probably want to use ParseQuotedFields() for RFC 1035-compliant quoting.