Standard library / encoding/csv
encoding/csv.ErrBareQuote
Sentinel for an unescaped quote in an unquoted field. Use errors.Is because Read normally wraps it in ParseError. Expected stdout: 'true\n'.
Formal Syntax & Structure
go syntaxgo
var ErrBareQuote errorWorking Example
Example Snippetgo
package main
import ( "encoding/csv" "errors" "fmt" "strings")
func must(e error) { if e != nil { panic(e) }}
func main() { r := csv.NewReader(strings.NewReader("a\"b,c\n")) _, e := r.Read() fmt.Println(errors.Is(e, csv.ErrBareQuote))}