摘要: 小程序可持续化自动部署 一、安装gitlab-runner 官方地址:https://docs.gitlab.com/runner/install/ windows安装如下: nodejs的环境变量一定要放到==系统变量==中!!! 进入硬盘任意一个目录,下载gitlab-runner.exe文件, 阅读全文
posted @ 2023-05-08 11:25 晚秋时节 阅读(309) 评论(0) 推荐(0)
摘要: ## 一、chan代码 ```go package main import ( "fmt" "sync" ) var code sync.WaitGroup func main() { // 创建一个int类型通道 ticketChan := make(chan int) // 判断还有几个线程 c 阅读全文
posted @ 2023-06-01 11:18 晚秋时节 阅读(21) 评论(0) 推荐(0)
摘要: ## 一、熟悉os、strconv包相关知识 ## 二、案例 ```go package main import ( "fmt" "io" "os" "strconv" ) // 复制文件 func main() { // 断点续传 // 源文件 sourceFile := "C:\\Users\\ 阅读全文
posted @ 2023-05-24 11:29 晚秋时节 阅读(18) 评论(0) 推荐(0)
摘要: Seeker接口 type Seeker interface { Seek(offset int64, whence int) (int64, error) } 这里的==Seek()==方法将移动当前读写位置到offset、whence表示的偏移处 ==offset==是相对于==whence== 阅读全文
posted @ 2023-05-18 13:58 晚秋时节 阅读(70) 评论(0) 推荐(0)
摘要: 一、引入math/rand包 import ( "math/rand" "time" ) 二、设置随机数种子 // 获取时间戳 timeStamp := time.Now().Unix() // 设置随机数种子 rand.Seek(timeStamp) 三、案例 for i := 1; i < 6; 阅读全文
posted @ 2023-05-15 14:45 晚秋时节 阅读(58) 评论(0) 推荐(0)
摘要: 一、服务器中输入命令 # 启动tomcat容器 别名tomcat1 docker run -d -P --name tomcat1 tomcat #进行tomcat1容器 docker exec -it tomcat1 /bin/bash 二、输入命令 ip ip addr bash: ip: co 阅读全文
posted @ 2023-05-12 16:18 晚秋时节 阅读(673) 评论(0) 推荐(0)
摘要: github action 自动化部署(docker) 上一篇博客pm2方式自动部署方式类型 一个利用==pm2==方式 本文利用==docker==方式 配置文件 name: github-action-demo # 工作流名称 on: push: branches: - develop # 生效 阅读全文
posted @ 2023-05-11 11:01 晚秋时节 阅读(146) 评论(0) 推荐(0)
摘要: github action 自动化部署 一、创建github 账户 官方地址 点击进入 注册/登录 二、在项目目录下创建文件 ==.github\workflows==固定不变 ==develop.yml==文件名自定义 三、编写配置文件 name: github-action-demo # 工作流 阅读全文
posted @ 2023-05-09 15:42 晚秋时节 阅读(257) 评论(0) 推荐(0)
摘要: 工厂模式是23种设计模式中的一种 分类 简单工厂模式 工厂方法模式 抽象工厂模式 简单工厂模式 // 车辆工厂 负责所有车辆的进出 public class CarFactory { public static Car getCar(String carName) { if (carName.equ 阅读全文
posted @ 2021-11-22 21:43 晚秋时节 阅读(44) 评论(0) 推荐(0)
摘要: 检查生产配置文件是否需要配置 例如 第三方域名 redis密码 等等 检查数据库是否需要更新脚本 如需 请提前准备脚本文件 检查是否有代码注释没有解除的 如有 撤掉注释 从develop分支上拉取release分支后跟日期 并打上tag 拉取release分支后 检查develop和release分 阅读全文
posted @ 2021-06-29 13:10 晚秋时节 阅读(17) 评论(0) 推荐(0)