// TryToGetName accepts object of any type, and tries to get a name from object.
TryToGetName accepts object of any type, and tries to get a name from object.
// TryToGetName accepts object of any type and tries to get a name from object .
func TryToGetName(obj interface{}) string {
	switch o := obj.(type) {
	default:
		return "unnamed"
	case Namer:
		return o.Name()
	case fmt.Stringer:
		return o.String()
	}
}
func TryToGetName ( obj interface { } ) string { switch o := obj . ( type ) { default : return " " case Namer : return o . Name ( ) case fmt . Stringer : return o . String ( ) } }
TryToGetName accepts object of any type, and tries to get a name from object.
TryToGetName accepts object of any type and tries to get a name from object .