toStringSlice converts [][]byte to []string for better error messages
(b [][]byte)
| 793 | |
| 794 | // toStringSlice converts [][]byte to []string for better error messages |
| 795 | func toStringSlice(b [][]byte) []string { |
| 796 | if b == nil { |
| 797 | return nil |
| 798 | } |
| 799 | result := make([]string, len(b)) |
| 800 | for i, v := range b { |
| 801 | if v == nil { |
| 802 | result[i] = "<nil>" |
| 803 | } else { |
| 804 | result[i] = string(v) |
| 805 | } |
| 806 | } |
| 807 | return result |
| 808 | } |
| 809 | |
| 810 | // TestZeroWidthMatchCharClass verifies that star patterns like [0-9]* correctly |
| 811 | // match zero characters when the input doesn't contain matching characters. |
no outgoing calls
no test coverage detected