func formatString(s string) string {
	// Use quoted string if it the same length as a raw string literal.
	// Otherwise, attempt to use the raw string form.
	qs := strconv.Quote(s)
	if len(qs) == 1+len(s)+1 {
		return qs
	}

	// Disallow newlines to ensure output is a single line.
	// Disallow non-printable runes for readability purposes.
	rawInvalid := func(r rune) bool {
		return r == '`' || r == '\n' || r == utf8.RuneError || !unicode.IsPrint(r)
	}
	if strings.IndexFunc(s, rawInvalid) < 0 {
		return "`" + s + "`"
	}
	return qs
}
// formatString returns a quoted string for s.
formatString returns a quoted string for s.
// formatString returns a quoted string for s .
func formatString(s string) string {
	qs := strconv.Quote(s)
	if len(qs) == 1+len(s)+1 {
		return qs
	}
	rawInvalid := func(r rune) bool {
		return r == '`' || r == '\n' || r == utf8.RuneError || !unicode.IsPrint(r)
	}
	if strings.IndexFunc(s, rawInvalid) < 0 {
		return "`" + s + "`"
	}
	return qs
}
func formatString ( s string ) string { qs := strconv . Quote ( s ) if len ( qs ) == 1 + len ( s ) + 1 { return qs } rawInvalid := func ( r rune ) bool { return r == '`' || r == '\n' || r == utf8 . RuneError || ! unicode . IsPrint ( r ) } if strings . IndexFunc ( s , rawInvalid ) < 0 { return " " + s + " " } return qs }
formatString returns a quoted string for s.
formatString returns a quoted string for s .
// Use quoted string if it the same length as a raw string literal. // Otherwise, attempt to use the raw string form. // Disallow newlines to ensure output is a single line. // Disallow non-printable runes for readability purposes.