func ToString(x interface{}) string {
	switch y := x.(type) {

	// Handle dates with special logic
	// This needs to come above the fmt.Stringer
	// test since time.Time's have a .String()
	// method
	case time.Time:
		return y.Format("A Monday")

	// Handle type string
	case string:
		return y

	// Handle type with .String() method
	case fmt.Stringer:
		return y.String()

	// Handle type with .Error() method
	case error:
		return y.Error()

	}

	// Handle named string type
	if v := reflect.ValueOf(x); v.Kind() == reflect.String {
		return v.String()
	}

	// Fallback to fmt package for anything else like numeric types
	return fmt.Sprint(x)
}
// ToString converts values of any type to string.
ToString converts values of any type to string.
// ToString converts values of any type to string .
func ToString(x interface{}) string {
	switch y := x.(type) {
	case time.Time:
		return y.Format("A Monday")
	case string:
		return y
	case fmt.Stringer:
		return y.String()
	case error:
		return y.Error()
	}
	if v := reflect.ValueOf(x); v.Kind() == reflect.String {
		return v.String()
	}
	return fmt.Sprint(x)
}
func ToString ( x interface { } ) string { switch y := x . ( type ) { case time . Time : return y . Format ( " " ) case string : return y case fmt . Stringer : return y . String ( ) case error : return y . Error ( ) } if v := reflect . ValueOf ( x ) ; v . Kind ( ) == reflect . String { return v . String ( ) } return fmt . Sprint ( x ) }
ToString converts values of any type to string.
ToString converts values of any type to string .
// Handle dates with special logic // This needs to come above the fmt.Stringer // test since time.Time's have a .String() // method // Handle type string // Handle type with .String() method // Handle type with .Error() method // Handle named string type // Fallback to fmt package for anything else like numeric types