We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Go
go 1.20.0
GoFrame
goframe v2.6.0
yes
sql:
DROP TABLE IF EXISTS `sys_config`; CREATE TABLE `sys_config` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '配置名称', `value` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '配置值', `created_at` timestamp NULL DEFAULT NULL COMMENT '创建时间', `updated_at` timestamp NULL DEFAULT NULL COMMENT '更新时间', PRIMARY KEY (`id`) USING BTREE, UNIQUE INDEX `name`(`name`(191)) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 50 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = COMPACT; -- ---------------------------- -- Records of sys_config -- ---------------------------- INSERT INTO `sys_config` VALUES (49, 'site', '{\"banned_ip\":\"22\",\"filings\":\"2222\",\"fixed_page\":\"\",\"site_name\":\"22\",\"version\":\"22\"}', '2023-12-19 14:08:25', '2023-12-19 14:08:25');
main.go
package main import ( "fmt" _ "github.com/gogf/gf/contrib/drivers/mysql/v2" "github.com/gogf/gf/v2/frame/g" ) func main() { type SysConfigInfo struct { Name string `json:"name" ` // 配置名称 Value map[string]string `json:"value" ` // 配置值 } var configData SysConfigInfo err := g.Model("sys_config").Scan(&configData) fmt.Println(err) fmt.Println(configData) }
{site map[banned_ip:22 filings:2222 fixed_page: site_name:22 version:22]}
{site map[]}
The text was updated successfully, but these errors were encountered:
fix issue #3218
55ceb8d
fix issue #3218 #3204
dece2df
fix issue #3218 #3204 (#3220)
645c5ff
gqcn
No branches or pull requests
1. What version of
Go
and system type/arch are you using?go 1.20.0
2. What version of
GoFrame
are you using?goframe v2.6.0
3. Can this issue be re-produced with the latest release?
yes
4. What did you do?
sql:
main.go
5. What did you expect to see?
6. What did you see instead?
The text was updated successfully, but these errors were encountered: