diff options
Diffstat (limited to 'conv/conv.go')
| -rw-r--r-- | conv/conv.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/conv/conv.go b/conv/conv.go index 01416125..e9e3033e 100644 --- a/conv/conv.go +++ b/conv/conv.go @@ -96,6 +96,15 @@ func ToString(in interface{}) string { return fmt.Sprint(in) } +// ToStrings - +func ToStrings(in ...interface{}) []string { + out := make([]string, len(in)) + for i, v := range in { + out[i] = ToString(v) + } + return out +} + // MustParseInt - wrapper for strconv.ParseInt that returns 0 in the case of error func MustParseInt(s string, base, bitSize int) int64 { i, _ := strconv.ParseInt(s, base, bitSize) |
