ZhangZhihui's Blog  

2026年3月26日

摘要: 查看.vscode/settings.json,删除python interprater相关行,然后重新选择Python env中python作为解释器。 阅读全文
posted @ 2026-03-26 20:01 ZhangZhihuiAAA 阅读(1) 评论(0) 推荐(0)

2026年3月25日

摘要: PS D:\zprojects> & d:\zprojects\zdab-venv\Scripts\Activate.ps1 & : 无法加载文件 D:\zprojects\zdab-venv\Scripts\Activate.ps1,因为在此系统上禁止运行脚本。有关详细信息,请参阅 https:/ 阅读全文
posted @ 2026-03-25 14:19 ZhangZhihuiAAA 阅读(6) 评论(0) 推荐(0)

2026年3月24日

摘要: 在 Windows 环境下开发带有 CGO 依赖(如 DuckDB)的 Go 项目,在 settings.json 中配置环境变量可以让你免去每次在 PowerShell 手动输入 $env:CGO_ENABLED="1" 的麻烦。 你可以通过以下步骤进行配置: 1. 打开 settings.jso 阅读全文
posted @ 2026-03-24 17:28 ZhangZhihuiAAA 阅读(5) 评论(0) 推荐(0)
 
摘要: 1. 快捷切换终端类型(最推荐) 在 VSCode 终端窗口的右上角,你会看到一个下拉箭头(通常在 + 号旁边): 点击那个下拉箭头。 选择 PowerShell 或 Command Prompt (CMD)。 此时路径会立即变为 Windows 格式,例如 D:\zprojects>。 2. 修改 阅读全文
posted @ 2026-03-24 16:37 ZhangZhihuiAAA 阅读(2) 评论(0) 推荐(0)
 
摘要: 在 Windows 上安装 DuckDB 分为 CLI 工具(用于调试) 和 Go 驱动(用于开发) 两个部分: 1. 安装 DuckDB 命令行工具 (CLI) —— 调试利器 你可以通过以下两种方式之一快速安装: 方法 A:使用包管理器(最推荐,自动配置环境变量) 如果你安装了 winget(W 阅读全文
posted @ 2026-03-24 14:23 ZhangZhihuiAAA 阅读(12) 评论(0) 推荐(0)

2026年3月23日

摘要: frank@ZZHPC:~/zproject/GO-CLI/healthcheck$ go get -u github.com/olekukonko/tablewriter go: downloading github.com/olekukonko/tablewriter v1.1.4 go: do 阅读全文
posted @ 2026-03-23 19:41 ZhangZhihuiAAA 阅读(1) 评论(0) 推荐(0)
 
摘要: Gemini said It’s a common point of confusion because, in older versions of Go, these two commands overlapped quite a bit. However, in modern Go (1.16+ 阅读全文
posted @ 2026-03-23 10:36 ZhangZhihuiAAA 阅读(2) 评论(0) 推荐(0)
 
摘要: frank@ZZHPC:~/zproject/GO-CLI$ go get -u github.com/spf13/cobra go: downloading github.com/inconshreveable/mousetrap v1.1.0 go: downloading github.com 阅读全文
posted @ 2026-03-23 10:19 ZhangZhihuiAAA 阅读(2) 评论(0) 推荐(0)

2026年3月22日

摘要: package main import ( "flag" "fmt" "log" "os" ) func main() { content := flag.String("content", "", "Content to write to the file") flag.Usage = func( 阅读全文
posted @ 2026-03-22 20:24 ZhangZhihuiAAA 阅读(3) 评论(0) 推荐(0)
 
摘要: package main import ( "flag" "fmt" "io" "log" "net/http" "os" "strings" "time" ) type URLList []string func (list *URLList) String() string { return f 阅读全文
posted @ 2026-03-22 12:03 ZhangZhihuiAAA 阅读(3) 评论(0) 推荐(0)