File tree Expand file tree Collapse file tree 1 file changed +16
-16
lines changed Expand file tree Collapse file tree 1 file changed +16
-16
lines changed Original file line number Diff line number Diff line change @@ -652,32 +652,32 @@ func escapeBytesBackslash(buf, v []byte) []byte {
652652 for _ , c := range v {
653653 switch c {
654654 case '\x00' :
655- buf [pos ] = '\\'
656655 buf [pos + 1 ] = '0'
656+ buf [pos ] = '\\'
657657 pos += 2
658658 case '\n' :
659- buf [pos ] = '\\'
660659 buf [pos + 1 ] = 'n'
660+ buf [pos ] = '\\'
661661 pos += 2
662662 case '\r' :
663- buf [pos ] = '\\'
664663 buf [pos + 1 ] = 'r'
664+ buf [pos ] = '\\'
665665 pos += 2
666666 case '\x1a' :
667- buf [pos ] = '\\'
668667 buf [pos + 1 ] = 'Z'
668+ buf [pos ] = '\\'
669669 pos += 2
670670 case '\'' :
671- buf [pos ] = '\\'
672671 buf [pos + 1 ] = '\''
672+ buf [pos ] = '\\'
673673 pos += 2
674674 case '"' :
675- buf [pos ] = '\\'
676675 buf [pos + 1 ] = '"'
676+ buf [pos ] = '\\'
677677 pos += 2
678678 case '\\' :
679- buf [pos ] = '\\'
680679 buf [pos + 1 ] = '\\'
680+ buf [pos ] = '\\'
681681 pos += 2
682682 default :
683683 buf [pos ] = c
@@ -697,32 +697,32 @@ func escapeStringBackslash(buf []byte, v string) []byte {
697697 c := v [i ]
698698 switch c {
699699 case '\x00' :
700- buf [pos ] = '\\'
701700 buf [pos + 1 ] = '0'
701+ buf [pos ] = '\\'
702702 pos += 2
703703 case '\n' :
704- buf [pos ] = '\\'
705704 buf [pos + 1 ] = 'n'
705+ buf [pos ] = '\\'
706706 pos += 2
707707 case '\r' :
708- buf [pos ] = '\\'
709708 buf [pos + 1 ] = 'r'
709+ buf [pos ] = '\\'
710710 pos += 2
711711 case '\x1a' :
712- buf [pos ] = '\\'
713712 buf [pos + 1 ] = 'Z'
713+ buf [pos ] = '\\'
714714 pos += 2
715715 case '\'' :
716- buf [pos ] = '\\'
717716 buf [pos + 1 ] = '\''
717+ buf [pos ] = '\\'
718718 pos += 2
719719 case '"' :
720- buf [pos ] = '\\'
721720 buf [pos + 1 ] = '"'
721+ buf [pos ] = '\\'
722722 pos += 2
723723 case '\\' :
724- buf [pos ] = '\\'
725724 buf [pos + 1 ] = '\\'
725+ buf [pos ] = '\\'
726726 pos += 2
727727 default :
728728 buf [pos ] = c
@@ -744,8 +744,8 @@ func escapeBytesQuotes(buf, v []byte) []byte {
744744
745745 for _ , c := range v {
746746 if c == '\'' {
747- buf [pos ] = '\''
748747 buf [pos + 1 ] = '\''
748+ buf [pos ] = '\''
749749 pos += 2
750750 } else {
751751 buf [pos ] = c
@@ -764,8 +764,8 @@ func escapeStringQuotes(buf []byte, v string) []byte {
764764 for i := 0 ; i < len (v ); i ++ {
765765 c := v [i ]
766766 if c == '\'' {
767- buf [pos ] = '\''
768767 buf [pos + 1 ] = '\''
768+ buf [pos ] = '\''
769769 pos += 2
770770 } else {
771771 buf [pos ] = c
You can’t perform that action at this time.
0 commit comments