# goutils **Repository Path**: zerofires/goutils ## Basic Information - **Project Name**: goutils - **Description**: 这是一个实用的 Go 工具包,提供了日志记录、消息推送等常用功能。 - **Primary Language**: Go - **License**: MIT - **Default Branch**: main - **Homepage**: https://gitee.com/zerofires/goutils - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-01-19 - **Last Updated**: 2025-01-23 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Go Utils Package 这是一个实用的 Go 工具包,提供了日志记录、消息推送等常用功能。 ## 模块目录 - [Logger](logger/README.md) - 功能强大的日志记录模块,支持多级别日志、文件轮转和控制台彩色输出 - [Notify](notify/README.md) - 基于 WxPusher 的消息推送模块,支持多种格式消息推送 ## 快速开始 1. 安装包 ```bash go get gitee.com/zerofires/goutils ``` 2. 导入需要的模块 ```go import ( "gitee.com/zerofires/goutils/logger" "gitee.com/zerofires/goutils/notify" ) ``` ## 运行测试 本项目所有模块都有完整的单元测试覆盖。你可以通过以下命令运行测试: ```bash # 运行所有测试 go test -v ./... # 运行指定模块的测试 go test -v ./logger go test -v ./notify # 运行指定测试用例 go test -v ./logger -run TestFileWriter_AsyncWrite # 运行测试并查看覆盖率 go test -cover -v ./logger ./notify # 运行测试并生成详细的覆盖率报告 go test ./logger ./notify -v -coverprofile="coverage.out" go tool cover -html="coverage.out" ``` ## 贡献指南 1. Fork 本仓库 2. 创建你的特性分支 (`git checkout -b feature/AmazingFeature`) 3. 提交你的改动 (`git commit -m 'Add some AmazingFeature'`) 4. 推送到分支 (`git push origin feature/AmazingFeature`) 5. 开启一个 Pull Request ## 许可证 本项目采用 MIT 许可证 - 查看 [LICENSE](LICENSE) 文件了解详情 ## 联系方式 - 项目维护者:[zerofires](https://gitee.com/zerofires) - 邮箱:fire2019@qq.com ## 致谢 - [WxPusher](http://wxpusher.zjiecode.com) - 提供微信消息推送服务