gf
gf copied to clipboard
my macbook exec gf(v2.1.0-rc2)) gen dao panic
my mac exec gf(v2.1.0-rc2)) gen dao error
fetching tables failed: sql.Open failed for driver "mysql" by source "root:12345678@tcp(127.0.0.1:3306)/test": sql: unknown driver "mysql" (forgotten import?)
- sql.Open failed for driver "mysql" by source "root:12345678@tcp(127.0.0.1:3306)/test" 1). github.com/gogf/gf/contrib/drivers/mysql/v2.(*DriverMysql).Open /home/runner/work/gf/gf/contrib/drivers/mysql/mysql.go:77 2). github.com/gogf/gf/v2/database/gdb.(*Core).getSqlDb.func1 /home/runner/work/gf/gf/database/gdb/gdb.go:556 3). github.com/gogf/gf/v2/container/gmap.(*StrAnyMap).doSetWithLockCheck /home/runner/work/gf/gf/container/gmap/gmap_hash_str_any_map.go:215 4). github.com/gogf/gf/v2/container/gmap.(*StrAnyMap).GetOrSetFuncLock /home/runner/work/gf/gf/container/gmap/gmap_hash_str_any_map.go:252 5). github.com/gogf/gf/v2/database/gdb.(*Core).getSqlDb /home/runner/work/gf/gf/database/gdb/gdb.go:547 6). github.com/gogf/gf/v2/database/gdb.(*Core).Slave /home/runner/work/gf/gf/database/gdb/gdb_core.go:145 7). github.com/gogf/gf/v2/database/gdb.(*Core).SlaveLink /home/runner/work/gf/gf/database/gdb/gdb_core_utility.go:83 8). github.com/gogf/gf/contrib/drivers/mysql/v2.(*DriverMysql).Tables /home/runner/work/gf/gf/contrib/drivers/mysql/mysql.go:115 9). github.com/gogf/gf/cmd/gf/v2/internal/cmd.doGenDaoForArray /home/runner/work/gf/gf/cmd/gf/internal/cmd/cmd_gen_dao.go:253 10). github.com/gogf/gf/cmd/gf/v2/internal/cmd.cGen.Dao /home/runner/work/gf/gf/cmd/gf/internal/cmd/cmd_gen_dao.go:181 11). github.com/gogf/gf/v2/os/gcmd.newCommandFromMethod.func1 /home/runner/work/gf/gf/os/gcmd/gcmd_command_object.go:315 12). github.com/gogf/gf/v2/os/gcmd.(*Command).doRun /home/runner/work/gf/gf/os/gcmd/gcmd_command_run.go:120 13). github.com/gogf/gf/v2/os/gcmd.(*Command).RunWithValueError /home/runner/work/gf/gf/os/gcmd/gcmd_command_run.go:77 14). github.com/gogf/gf/v2/os/gcmd.(*Command).RunWithValue /home/runner/work/gf/gf/os/gcmd/gcmd_command_run.go:32 15). github.com/gogf/gf/v2/os/gcmd.(*Command).Run /home/runner/work/gf/gf/os/gcmd/gcmd_command_run.go:26 16). main.main /home/runner/work/gf/gf/cmd/gf/main.go:69
- sql: unknown driver "mysql" (forgotten import?)
Seems to have lost the drive?
Seems to have lost the drive?
release v2.1.0 ,Try updating to the latest version.
https://goframe.org/display/gf/v2.1+2022-06-22