上一页 1 ··· 44 45 46 47 48 49 50 51 52 ··· 169 下一页
摘要: 一,自定义io.Writer需要实现什么接口? package io type Writer interface { Write(p []byte) (n int, err error) } 二,Writer类代码: package fileWriter import ( "io" "os" "sy 阅读全文
posted @ 2025-02-23 17:38 刘宏缔的架构森林 阅读(96) 评论(0) 推荐(0)
摘要: 一,需求说明: 我们的go程序的访问日志用了zap的BufferedWriteSyncer,默认一分钟后写入到磁盘,如果这时候go应用发生意外退出,则日志可能不能落盘,所以gin退出前,要把未执行的工作先结束才行 二,代码例子: package main import "C" import ( "f 阅读全文
posted @ 2025-02-23 17:37 刘宏缔的架构森林 阅读(134) 评论(0) 推荐(0)
摘要: 一,命令格式: mysql -u 用户名 -p 数据库名 < 文件路径 用户名是登录MySQL时使用的用户名,数据库名是要导入SQL文件的数据库名,文件路径是要导入的SQL文件的路径。执行此命令后,系统会提示输入密码,输入密码后即可开始导入 二,实际应用的一个例子: $ mysql -u root 阅读全文
posted @ 2025-02-23 17:37 刘宏缔的架构森林 阅读(556) 评论(0) 推荐(0)
摘要: 一,代码: 1,global/accessLogger.go 初始化全局变量 package global import ( "go.uber.org/zap" "go.uber.org/zap/zapcore" "os" "time" ) var ( LogFileAccess *os.File 阅读全文
posted @ 2025-02-23 17:36 刘宏缔的架构森林 阅读(173) 评论(0) 推荐(0)
摘要: 一,下载地址: 官网: https://www.rarlab.com/ 找到for linux的下载链接 二,从命令行下载: # cd /usr/local/source/ # mkdir rar # cd rar # wget https://www.rarlab.com/rar/rarlinux 阅读全文
posted @ 2025-02-23 17:36 刘宏缔的架构森林 阅读(68) 评论(0) 推荐(0)
摘要: 一,报错信息: checking for oniguruma... no configure: error: Package requirements (oniguruma) were not met: Package 'oniguruma', required by 'virtual:world' 阅读全文
posted @ 2025-02-15 11:13 刘宏缔的架构森林 阅读(634) 评论(0) 推荐(0)
摘要: 一,重置密码时的报错信息 mysql> alter user root@localhost identified by 'mypassword'; ERROR 1819 (HY000): Your password does not satisfy the current policy requir 阅读全文
posted @ 2025-02-15 11:12 刘宏缔的架构森林 阅读(335) 评论(0) 推荐(0)
摘要: 一,下载yum库的rpm包 # wget https://dev.mysql.com/get/mysql84-community-release-el9-1.noarch.rpm 安装: # rpm -ivh mysql84-community-release-el9-1.noarch.rpm wa 阅读全文
posted @ 2025-02-15 11:12 刘宏缔的架构森林 阅读(205) 评论(0) 推荐(0)
摘要: 一,报错信息: (parted) mkpart primary 0 100% Warning: The resulting partition is not properly aligned for best performance: 34s % 2048s != 0s Ignore/Cancel? 阅读全文
posted @ 2025-02-15 11:11 刘宏缔的架构森林 阅读(460) 评论(0) 推荐(0)
摘要: 一,代码: 1,controller/ImageController.go //得到详情 func (ic *ImageController) Detail(c *gin.Context) { // gin版本 ginVersion:=gin.Version // golang 版本 golangV 阅读全文
posted @ 2025-02-15 11:11 刘宏缔的架构森林 阅读(77) 评论(0) 推荐(0)
上一页 1 ··· 44 45 46 47 48 49 50 51 52 ··· 169 下一页