(value any)
| 839 | } |
| 840 | |
| 841 | func (this *Rule) stringifyValue(value any) string { |
| 842 | if value == nil { |
| 843 | return "" |
| 844 | } |
| 845 | switch v := value.(type) { |
| 846 | case string: |
| 847 | return v |
| 848 | case []string: |
| 849 | return strings.Join(v, "") |
| 850 | case []byte: |
| 851 | return string(v) |
| 852 | case [][]byte: |
| 853 | var b = &bytes.Buffer{} |
| 854 | for _, vb := range v { |
| 855 | b.Write(vb) |
| 856 | } |
| 857 | return b.String() |
| 858 | default: |
| 859 | return types.String(v) |
| 860 | } |
| 861 | } |
no test coverage detected