上一页 1 ··· 56 57 58 59 60 61 62 63 64 ··· 169 下一页
摘要: 一,修改go.mod中的名字 module myfiber go 1.23.3 修改后: module industry go 1.23.3 二,清理和整理模块文件 $ go mod tidy 三,重新build $ go build 可以看到编译后文件名已改变为新模块名字 阅读全文
posted @ 2024-11-16 12:39 刘宏缔的架构森林 阅读(191) 评论(0) 推荐(0)
摘要: 一,go代码: controller/articleController.go package controller import "github.com/gofiber/fiber/v2" type ArticleController struct{} func NewArticleControl 阅读全文
posted @ 2024-11-16 12:38 刘宏缔的架构森林 阅读(64) 评论(0) 推荐(0)
摘要: 一,代码: 1,自定义错误类: package config import ( "fmt" ) //定义错误代码和错误信息 type MyError struct { Code int Msg string } //需要定义通用的Error()方法 func (e MyError) Error() 阅读全文
posted @ 2024-11-15 11:28 刘宏缔的架构森林 阅读(72) 评论(0) 推荐(0)
摘要: 一,官网 https://gofiber.io/ 中文文档: https://docs.fiber.org.cn/ 二,初始化项目: $ go mod init myfiber go: creating new go.mod: module myfiber go: to add module req 阅读全文
posted @ 2024-11-09 21:41 刘宏缔的架构森林 阅读(173) 评论(0) 推荐(0)
摘要: 一,下载 官网: https://go.dev/ 从首页进入到下载页面: 如图: 选择适合自己系统的版本 复制下载地址,从命令行下载 $ wget https://go.dev/dl/go1.23.3.linux-amd64.tar.gz 二,安装 1,解压: $ tar -zxvf go1.23. 阅读全文
posted @ 2024-11-09 21:11 刘宏缔的架构森林 阅读(2669) 评论(0) 推荐(0)
摘要: 一,修改代码后使生效: # php artisan octane:reload INFO Reloading workers... 二,停止octane: 说明;用supervisor管理服务,此操作不生效 # php artisan octane:stop INFO Stopping server 阅读全文
posted @ 2024-11-08 17:10 刘宏缔的架构森林 阅读(99) 评论(0) 推荐(0)
摘要: 一,配置 nginx 1,一个nginx的server段 在server段之外添加: map $http_upgrade $connection_upgrade { default upgrade; '' close; } 在server段中添加如下内容: location /index.php { 阅读全文
posted @ 2024-11-08 14:55 刘宏缔的架构森林 阅读(130) 评论(0) 推荐(0)
摘要: 一,ubuntu安装supervisor 1, 用apt安装 # apt install supervisor 2,安装完成后查看状态: # systemctl status supervisor.service ● supervisor.service - Supervisor process c 阅读全文
posted @ 2024-11-08 14:08 刘宏缔的架构森林 阅读(128) 评论(0) 推荐(0)
摘要: 一,报错信息 # apt install supervisor 正在读取软件包列表... 完成 正在分析软件包的依赖关系树... 完成 正在读取状态信息... 完成 您也许需要运行“apt --fix-broken install”来修正上面的错误。 下列软件包有未满足的依赖关系: libxpm-d 阅读全文
posted @ 2024-11-08 13:34 刘宏缔的架构森林 阅读(1491) 评论(0) 推荐(0)
摘要: 一,旧版本ubuntu上的apt源不能用了 # apt-get update 忽略:1 http://mirrors.aliyun.com/ubuntu hirsute InRelease 忽略:2 http://mirrors.aliyun.com/ubuntu hirsute-security 阅读全文
posted @ 2024-11-08 11:58 刘宏缔的架构森林 阅读(379) 评论(0) 推荐(1)
上一页 1 ··· 56 57 58 59 60 61 62 63 64 ··· 169 下一页