# go-all **Repository Path**: ling1314/go-all ## Basic Information - **Project Name**: go-all - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-04-24 - **Last Updated**: 2024-05-06 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 环境配置 ``` 设置代理 go env -w GOPROXY=https://goproxy.cn,direct ``` # 开源组件及学习文档 ``` 配置文件读取 https://github.com/spf13/viper 记录日志 https://github.com/sirupsen/logrus 日志切割 https://gopkg.in/natefinch/lumberjack.v3 雪花主键 https://github.com/bwmarrin/snowflake web框架 https://github.com/gin-gonic/gin # 数据和相关驱动 https://gorm.io/docs/ go get -u gorm.io/gorm go get -u gorm.io/driver/sqlite go get gorm.io/plugin/soft_delete ``` # 项目目录结构 ``` ├─api │ ├─doc 文档目录 │ ├─make 构建脚本目录 │ └─src 代码目录 │ ├─bin 可执行文件目录 │ │ ├─langs // 多语言配置文件 │ │ ├─logs //日志文件 │ │ └─source //静态资源文件 │ ├─cli // 命令行工具 ├─full // 最大的main程序入口,如果是走完整的微服务路线,这个可能是不存在的,还在权衡中!。 ├─global //全局通用代码 │ ├─db //数据库适配层 │ ├─lang //多语言适配层 │ ├─middleware //中间件 │ └─structs //结构体 │ ├─enum //枚举定义 │ ├─lms //在线学习考试模块管理端的结构体 │ ├─study //在线学习考试模块学习端的结构体 │ └─table //数据库表结构 ├─lib // 常用库 │ ├─config // 配置文件 │ ├─file //文件操作 │ ├─jwt // jwt令牌 │ ├─log // 日志 │ └─utils // 其他,该包下不要引入任何第三方依赖 ├─modules // 具体的功能模块 │ ├─lms // 在线学习考试管理模块 │ │ ├─api-router // 路由层,加个api前缀只为为了让它在上面,强迫症犯了 │ │ ├─controller // 控制层,这一层处理和前端的参数交互处理 │ │ ├─repository // 处理和数据库层的交互,本来是打算省略这一层的,想了一下,不应该省略。 │ │ └─service // 逻辑层 │ └─study // 在线学习考试学习模块 └─uint // 测试用例 ```