Skip to content

Instantly share code, notes, and snippets.

@cybersiddhu
Last active August 29, 2015 13:57
Show Gist options
  • Select an option

  • Save cybersiddhu/9506463 to your computer and use it in GitHub Desktop.

Select an option

Save cybersiddhu/9506463 to your computer and use it in GitHub Desktop.
panic: reflect: call of reflect.Value.FieldByName on string Value
goroutine 1 [running]:
runtime.panic(0x709360, 0xc210072540)
/custom/golang/go/src/pkg/runtime/panic.c:266 +0xb6
reflect.flag.mustBe(0x186, 0x19)
/custom/golang/go/src/pkg/reflect/value.go:241 +0x8c
reflect.Value.FieldByName(0x6b12e0, 0xc210073df0, 0x186, 0xc210000c90, 0x6, ...)
/custom/golang/go/src/pkg/reflect/value.go:841 +0x40
github.com/jinzhu/gorm.(*Scope).Fields(0xc210078600, 0xc21008a1e0, 0x7f92cbfce130, 0x7f92cbfce000)
/home/cybersiddhu/golang/src/github.com/jinzhu/gorm/scope.go:257 +0x61f
github.com/jinzhu/gorm.(*Scope).createTable(0xc210078600, 0x0)
/home/cybersiddhu/golang/src/github.com/jinzhu/gorm/scope_private.go:414 +0x56
github.com/jinzhu/gorm.(*DB).CreateTable(0xc98680, 0x69d0a0, 0xc21006e580, 0x0)
/home/cybersiddhu/golang/src/github.com/jinzhu/gorm/main.go:286 +0xd2
github.com/dictybase/gorm_test.init·1()
/home/cybersiddhu/golang/src/github.com/dictybase/gorm/main_test.go:133 +0x593
github.com/dictybase/gorm_test.init()
/home/cybersiddhu/golang/src/github.com/dictybase/gorm/main_test.go:1744 +0x79
main.init()
github.com/dictybase/gorm/_test/_testmain.go:156 +0x3d
goroutine 3 [chan receive]:
database/sql.(*DB).connectionOpener(0xc210074580)
/custom/golang/go/src/pkg/database/sql/sql.go:574 +0x3e
created by database/sql.Open
/custom/golang/go/src/pkg/database/sql/sql.go:436 +0x24d
goroutine 6 [runnable]:
github.com/jinzhu/gorm.(*safeMap).Set(0xc21000a690, 0x769ec0, 0x2, 0xc2100008d0, 0x2)
/home/cybersiddhu/golang/src/github.com/jinzhu/gorm/utils.go:21
created by github.com/jinzhu/gorm.toSnake
/home/cybersiddhu/golang/src/github.com/jinzhu/gorm/utils.go:54 +0x219
goroutine 5 [syscall]:
runtime.goexit()
/custom/golang/go/src/pkg/runtime/proc.c:1394
goroutine 7 [runnable]:
github.com/jinzhu/gorm.(*safeMap).Set(0xc21000a690, 0x767c40, 0x3, 0xc210000918, 0x3)
/home/cybersiddhu/golang/src/github.com/jinzhu/gorm/utils.go:21
created by github.com/jinzhu/gorm.toSnake
/home/cybersiddhu/golang/src/github.com/jinzhu/gorm/utils.go:54 +0x219
goroutine 8 [runnable]:
github.com/jinzhu/gorm.(*safeMap).Set(0xc21000a690, 0x76af00, 0x4, 0xc210000960, 0x4)
/home/cybersiddhu/golang/src/github.com/jinzhu/gorm/utils.go:21
created by github.com/jinzhu/gorm.toSnake
/home/cybersiddhu/golang/src/github.com/jinzhu/gorm/utils.go:54 +0x219
goroutine 9 [runnable]:
github.com/jinzhu/gorm.(*safeMap).Set(0xc21000a690, 0x779510, 0x8, 0xc210073aa0, 0x8)
/home/cybersiddhu/golang/src/github.com/jinzhu/gorm/utils.go:21
created by github.com/jinzhu/gorm.toSnake
/home/cybersiddhu/golang/src/github.com/jinzhu/gorm/utils.go:54 +0x219
goroutine 10 [runnable]:
github.com/jinzhu/gorm.(*safeMap).Set(0xc21000a690, 0x779c70, 0x9, 0xc210073ae0, 0xa)
/home/cybersiddhu/golang/src/github.com/jinzhu/gorm/utils.go:21
created by github.com/jinzhu/gorm.toSnake
/home/cybersiddhu/golang/src/github.com/jinzhu/gorm/utils.go:54 +0x219
goroutine 11 [runnable]:
github.com/jinzhu/gorm.(*safeMap).Set(0xc21000a690, 0x77dc30, 0x9, 0xc210073b20, 0xa)
/home/cybersiddhu/golang/src/github.com/jinzhu/gorm/utils.go:21
created by github.com/jinzhu/gorm.toSnake
/home/cybersiddhu/golang/src/github.com/jinzhu/gorm/utils.go:54 +0x219
goroutine 12 [runnable]:
github.com/jinzhu/gorm.(*safeMap).Set(0xc21000a690, 0x779ef0, 0x9, 0xc210073b60, 0xa)
/home/cybersiddhu/golang/src/github.com/jinzhu/gorm/utils.go:21
created by github.com/jinzhu/gorm.toSnake
/home/cybersiddhu/golang/src/github.com/jinzhu/gorm/utils.go:54 +0x219
goroutine 13 [runnable]:
github.com/jinzhu/gorm.(*safeMap).Set(0xc21000a690, 0x768e60, 0x6, 0xc210000a58, 0x6)
/home/cybersiddhu/golang/src/github.com/jinzhu/gorm/utils.go:21
created by github.com/jinzhu/gorm.toSnake
/home/cybersiddhu/golang/src/github.com/jinzhu/gorm/utils.go:54 +0x219
goroutine 14 [runnable]:
github.com/jinzhu/gorm.(*safeMap).Set(0xc21000a690, 0x78ff90, 0x12, 0xc210072120, 0x14)
/home/cybersiddhu/golang/src/github.com/jinzhu/gorm/utils.go:21
created by github.com/jinzhu/gorm.toSnake
/home/cybersiddhu/golang/src/github.com/jinzhu/gorm/utils.go:54 +0x219
goroutine 15 [runnable]:
github.com/jinzhu/gorm.(*safeMap).Set(0xc21000a690, 0x7794d0, 0xe, 0xc210073c20, 0xf)
/home/cybersiddhu/golang/src/github.com/jinzhu/gorm/utils.go:21
created by github.com/jinzhu/gorm.toSnake
/home/cybersiddhu/golang/src/github.com/jinzhu/gorm/utils.go:54 +0x219
goroutine 16 [runnable]:
github.com/jinzhu/gorm.(*safeMap).Set(0xc21000a690, 0x78f710, 0x10, 0xc210072200, 0x12)
/home/cybersiddhu/golang/src/github.com/jinzhu/gorm/utils.go:21
created by github.com/jinzhu/gorm.toSnake
/home/cybersiddhu/golang/src/github.com/jinzhu/gorm/utils.go:54 +0x219
goroutine 17 [runnable]:
github.com/jinzhu/gorm.(*safeMap).Set(0xc21000a690, 0x77d090, 0xf, 0xc210072260, 0x10)
/home/cybersiddhu/golang/src/github.com/jinzhu/gorm/utils.go:21
created by github.com/jinzhu/gorm.toSnake
/home/cybersiddhu/golang/src/github.com/jinzhu/gorm/utils.go:54 +0x219
goroutine 18 [runnable]:
github.com/jinzhu/gorm.(*safeMap).Set(0xc21000a690, 0x791250, 0x11, 0xc210072320, 0x13)
/home/cybersiddhu/golang/src/github.com/jinzhu/gorm/utils.go:21
created by github.com/jinzhu/gorm.toSnake
/home/cybersiddhu/golang/src/github.com/jinzhu/gorm/utils.go:54 +0x219
goroutine 19 [runnable]:
github.com/jinzhu/gorm.(*safeMap).Set(0xc21000a690, 0x76d7e0, 0x4, 0xc210000b90, 0x4)
/home/cybersiddhu/golang/src/github.com/jinzhu/gorm/utils.go:21
created by github.com/jinzhu/gorm.toSnake
/home/cybersiddhu/golang/src/github.com/jinzhu/gorm/utils.go:54 +0x219
goroutine 20 [runnable]:
github.com/jinzhu/gorm.(*safeMap).Set(0xc21000a690, 0x779c90, 0xa, 0xc210073d10, 0xb)
/home/cybersiddhu/golang/src/github.com/jinzhu/gorm/utils.go:21
created by github.com/jinzhu/gorm.toSnake
/home/cybersiddhu/golang/src/github.com/jinzhu/gorm/utils.go:54 +0x219
goroutine 21 [runnable]:
github.com/jinzhu/gorm.(*safeMap).Set(0xc21000a690, 0x77afd0, 0x8, 0xc210073d50, 0x8)
/home/cybersiddhu/golang/src/github.com/jinzhu/gorm/utils.go:21
created by github.com/jinzhu/gorm.toSnake
/home/cybersiddhu/golang/src/github.com/jinzhu/gorm/utils.go:54 +0x219
goroutine 22 [runnable]:
github.com/jinzhu/gorm.(*safeMap).Set(0xc21000a690, 0x77bfb0, 0xc, 0xc210073d90, 0xd)
/home/cybersiddhu/golang/src/github.com/jinzhu/gorm/utils.go:21
created by github.com/jinzhu/gorm.toSnake
/home/cybersiddhu/golang/src/github.com/jinzhu/gorm/utils.go:54 +0x219
goroutine 23 [runnable]:
github.com/jinzhu/gorm.(*safeMap).Set(0xc21000a690, 0x77aa50, 0x8, 0xc210073dd0, 0x9)
/home/cybersiddhu/golang/src/github.com/jinzhu/gorm/utils.go:21
created by github.com/jinzhu/gorm.toSnake
/home/cybersiddhu/golang/src/github.com/jinzhu/gorm/utils.go:54 +0x219
goroutine 24 [runnable]:
github.com/jinzhu/gorm.(*safeMap).Set(0xc21000a690, 0x78ff50, 0x11, 0xc2100724a0, 0x13)
/home/cybersiddhu/golang/src/github.com/jinzhu/gorm/utils.go:21
created by github.com/jinzhu/gorm.toSnake
/home/cybersiddhu/golang/src/github.com/jinzhu/gorm/utils.go:54 +0x219
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment