上一页 1 ··· 53 54 55 56 57 58 59 60 61 ··· 169 下一页
摘要: 一,为指定commit打tag: # git tag 'v1.0.1' f172507f3e9eaf6edb13042f51a52934e48925b7 查看tag列表: # git tag v1.0.1 二,从tag获取当前版本: 展示当前分支的最近的 tag # git describe --t 阅读全文
posted @ 2024-12-07 10:50 刘宏缔的架构森林 阅读(189) 评论(0) 推荐(0)
摘要: 一,代码: func SetupRoutes(viewEngine *html.Engine) *fiber.App { // 创建 Fiber 应用 app := fiber.New(fiber.Config{ Views: viewEngine, }) app.Use(recover.New() 阅读全文
posted @ 2024-12-07 10:50 刘宏缔的架构森林 阅读(11) 评论(0) 推荐(0)
摘要: 一,官方文档地址: https://gorm.io/zh_CN/docs/logger.html 二,代码例子: 1,写日志到文件的函数: // 日志写入到文件 func LogToFile(filename,msg string) { // 输出到文件 //filename := "logs/" 阅读全文
posted @ 2024-12-07 10:49 刘宏缔的架构森林 阅读(171) 评论(0) 推荐(0)
摘要: 一,代码: <?php //调用函数一 function afunc($b, $c) { echo "afunc:参数b:".$b.":<br/>"; echo "afunc:参数c:".$c.":<br/>"; } //调用函数二 function bfunc($b, $c) { $sum = $ 阅读全文
posted @ 2024-12-01 17:00 刘宏缔的架构森林 阅读(111) 评论(0) 推荐(0)
摘要: 一,go-playground/validator官方代码地址 https://github.com/go-playground/validator 二,安装 $ go get -u github.com/go-playground/validator/v10 go: downloading git 阅读全文
posted @ 2024-11-30 11:10 刘宏缔的架构森林 阅读(346) 评论(0) 推荐(0)
摘要: 一,创建索引 CREATE FULLTEXT INDEX ft_content ON table_name (content) WITH PARSER ngram; 表名和字段可以用``表示引用 说明:创建全文索引时,如果不添加WITH PARSER ngram;有可能会检索不到结果 二,测试: 1 阅读全文
posted @ 2024-11-30 10:49 刘宏缔的架构森林 阅读(143) 评论(0) 推荐(0)
摘要: 一,代码 1,全局文件: // 日志消息结构体 type LogMessage struct { Level string Message string } //通道 var LogChan chan LogMessage //日志文件句柄 var GlobalLogFile *os.File // 阅读全文
posted @ 2024-11-30 10:48 刘宏缔的架构森林 阅读(83) 评论(0) 推荐(0)
摘要: 一,现象: 如果填写参数时使用的是params类型,而value中包含+,则此时的值在提交到线上时会被替换成空格,原因是:使用params类型参数和值会拼接在url中 二,解决: 在body标签下,使用form-data类型,此时的各项值不会被拼接到url中,+也就不会被替换成空格了 阅读全文
posted @ 2024-11-27 09:57 刘宏缔的架构森林 阅读(237) 评论(0) 推荐(0)
摘要: 一,代码: Unicode是为了解决传统的字符编码方案的局限而产生的,它为每种语言中的每个字符设定了统一并且唯一的二进制编码, 以满足跨语言、跨平台进行文本转换、处理的要求 package controller import ( "encoding/json" "fmt" "github.com/g 阅读全文
posted @ 2024-11-25 19:43 刘宏缔的架构森林 阅读(42) 评论(0) 推荐(0)
摘要: 一,代码: package main import ( "embed" "flag" "github.com/gofiber/template/html/v2" "net/http" "fmt" "runtime" "industry/config" "industry/routes" ) // 构 阅读全文
posted @ 2024-11-23 10:43 刘宏缔的架构森林 阅读(58) 评论(0) 推荐(0)
上一页 1 ··· 53 54 55 56 57 58 59 60 61 ··· 169 下一页