mirror of https://github.com/spf13/cast.git
Convert string slice to string using strings.Join(s, ",").
Signed-off-by: Francis Laniel <flaniel@linux.microsoft.com>
This commit is contained in:
parent
48ddde5701
commit
6d60b2cd4e
2
caste.go
2
caste.go
|
@ -964,6 +964,8 @@ func ToStringE(i interface{}) (string, error) {
|
||||||
return s.String(), nil
|
return s.String(), nil
|
||||||
case []byte:
|
case []byte:
|
||||||
return string(s), nil
|
return string(s), nil
|
||||||
|
case []string:
|
||||||
|
return strings.Join(s, ","), nil
|
||||||
case template.HTML:
|
case template.HTML:
|
||||||
return string(s), nil
|
return string(s), nil
|
||||||
case template.URL:
|
case template.URL:
|
||||||
|
|
Loading…
Reference in New Issue