generated from alecodes/base-template
wip: implementing db initialization
This commit is contained in:
parent
ffd3c2014e
commit
89d7b8130a
18 changed files with 745 additions and 0 deletions
13
pkg/utils.go
Normal file
13
pkg/utils.go
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
package synchronizator
|
||||
|
||||
import "reflect"
|
||||
|
||||
func getTypeOfStruct(shape interface{}) string {
|
||||
// Get the type and handle pointer types
|
||||
t := reflect.TypeOf(shape)
|
||||
if t.Kind() == reflect.Ptr {
|
||||
t = t.Elem()
|
||||
}
|
||||
|
||||
return t.Name()
|
||||
}
|
||||
Reference in a new issue