19 lines
293 B
Go
19 lines
293 B
Go
|
package proxy
|
||
|
|
||
|
import (
|
||
|
"strconv"
|
||
|
)
|
||
|
|
||
|
// 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 ""
|
||
|
}
|