mirror of
https://github.com/gluster/glusterd2.git
synced 2026-02-05 12:45:38 +01:00
11 lines
289 B
Go
11 lines
289 B
Go
package utils
|
|
|
|
import "reflect"
|
|
|
|
// GetTypeString returns the type of instance passed, as a string.
|
|
// Go doesn't have type literals. Hence one has to pass (*Type)(nil)
|
|
// as argument to this function.
|
|
func GetTypeString(i interface{}) string {
|
|
return reflect.TypeOf(i).Elem().String()
|
|
}
|