摘要: const formatSize=(size)=>{ if (size < 1024) { return size + "b"; } else if (size < 1024 * 1024) { return (size / 1024).toFixed(2) + "KB"; } else if (s 阅读全文
posted @ 2023-08-04 17:48 厚礼蝎 阅读(38) 评论(0) 推荐(0) 编辑
摘要: 想将favicon.ico文件与Go程序一起打包,可以使用Go的内嵌资源(Embedded Resources)功能。 这样做可以将文件内容嵌入到Go二进制文件中,使其成为一个独立的可执行文件,无需再依赖外部文件。 使用内嵌资源的步骤如下: 1. 将favicon.ico文件放置在Go项目的某个目录 阅读全文
posted @ 2023-08-04 17:45 厚礼蝎 阅读(232) 评论(0) 推荐(0) 编辑