code: func SplitQuotedFields(in string) []string {
  	type stateEnum int
  	const (
  		inSpace stateEnum = iota
  		inField
  		inQuote
  		inQuoteEscaped
  	)
  	state := inSpace
  	r := []string{}
  	var buf bytes.Buffer
  
  	for _, ch := range in {
  		switch state {
  		case inSpace:
  			if ch == '\'' {
  				state = inQuote
  			} else if !unicode.IsSpace(ch) {
  				buf.WriteRune(ch)
  				state = inField
  			}
  
  		case inField:
  			if ch == '\'' {
  				state = inQuote
  			} else if unicode.IsSpace(ch) {
  				r = append(r, buf.String())
  				buf.Reset()
  			} else {
  				buf.WriteRune(ch)
  			}
  
  		case inQuote:
  			if ch == '\'' {
  				state = inField
  			} else if ch == '\\' {
  				state = inQuoteEscaped
  			} else {
  				buf.WriteRune(ch)
  			}
  
  		case inQuoteEscaped:
  			buf.WriteRune(ch)
  			state = inQuote
  		}
  	}
  
  	if buf.Len() != 0 {
  		r = append(r, buf.String())
  	}
  
  	return r
  }
docs: // SplitQuotedFields is like strings.Fields but ignores spaces
  // inside areas surrounded by single quotes.
  // To specify a single quote use backslash to escape it: '\''