cloudSky's 小站

[Go] Gin使用Swagger生成接囗文档

环境 go 1.20 安装 go install github.com/swaggo/swag/cmd/swag 使用 在项目根目录执行 swag init 将会在项目根目录下生成 docs 目录和相应的 Swagger 文档文件。 . ├── docs │ ├── docs.go │ ├── swagger.json │ └── swagger.yaml ├── go.mod ├

Debian 12配置静态IP

最近体验Debian 12,发现静态IP配置方式与之前版本不太一样了,下面我们就来探究探究。 Netplan介绍 在默认情况下,Debian 12 使用

[Go] 使用函数选项模式

Go 不是完全面向对象语言,有一些面向对象模式不太适合它。但经过这些年的发展,Go 有自己的一些模式。今天介绍一个常见的模式:函数选项模式(Fun

[Go] defer学习

在 Go 语言中使用 defer 关键字可以将代码延迟到函数结束之前执行。在开发中,我们经常使用 defer 关键字完成善后工作,如关闭打开的文件描述符、关闭连接以及释放

解决Android安装包签名异常

环境 Unity 2021.3 Android Gradle Plugin(AGP): 4.0.1 Gradle: 6.1.1 APK 大小: 2.1G 系统版本: Android 12 使用adb安装报错如下 adb install /tmp/com.test.demo_0.0.1_18971.apk /tmp/com.test.demo_0.0.1_18971.apk Performing Streamed Install adb: failed to install /tmp/com.test.demo_0.0.1_18971.apk: Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES: Failed collecting certificates for /data/app/vmdl226784575.tmp/base.apk: Failed to collect certificates from /data/app/vmdl226784575.tmp/base.apk using APK Signature Scheme v2: integer overflow] 之前 APK 安装

git clone Out of memory, malloc failed

报错如下 [root@localhost ~]# git clone xxx/iOSClient.git Cloning into 'iOSClient'... remote: Enumerating objects: 4455, done. remote: Counting objects: 100% (4455/4455), done. remote: warning: suboptimal pack - out of memory remote: error: Out of memory, malloc failed (tried to allocate 343057209 bytes) remote: fatal: packed object 98d3df78eb15e9010125e8d6c005f2e0a3792164 (stored in ./objects/pack/pack-c077e52335fd57f98e2fbe83ed034dde18fd6071.pack) is corrupt remote: aborting due to possible repository corruption on the remote side. error: git upload-pack: git-pack-objects died with