2021-04-23 13:07:44 +01:00
|
|
|
package proxy
|
|
|
|
|
2021-05-11 19:02:36 +01:00
|
|
|
import (
|
2021-06-19 14:24:51 +01:00
|
|
|
"strconv"
|
2021-05-11 19:02:36 +01:00
|
|
|
)
|
2021-04-23 13:07:44 +01:00
|
|
|
|
2021-06-19 14:24:51 +01:00
|
|
|
// toString Generic to string function, currently supports actual strings and integers
|
|
|
|
func toString(in interface{}) string {
|
|
|
|
switch v := in.(type) {
|
|
|
|
case string:
|
|
|
|
return v
|
|
|
|
case *string:
|
|
|
|
return *v
|
|
|
|
case int:
|
|
|
|
return strconv.Itoa(v)
|
|
|
|
}
|
|
|
|
return ""
|
|
|
|
}
|