1
0
mirror of https://github.com/gluster/glusterd2.git synced 2026-02-05 12:45:38 +01:00
Files
glusterd2/pkg/utils/types.go
Mohammed Rafi KC acf41b0a82 glusterd2: Refactoring of functions for snapshot
Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
2018-03-16 14:56:29 +05:30

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()
}