# flamego-study **Repository Path**: aohanhongzhi/flamego-study ## Basic Information - **Project Name**: flamego-study - **Description**: flamego学习,flamego只是一个web层的框架,操作数据库需要结合ORM框架如gorm - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: https://flamego.cn/ - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-04-20 - **Last Updated**: 2024-07-04 ## Categories & Tags **Categories**: Uncategorized **Tags**: Go语言 ## README Flamego === # 设置代理 ```shell GOPROXY=https://goproxy.cn,direct ``` > https://goproxy.io/zh/ # flamego 框架 https://gitee.com/flamego/flamego https://flamego.cn/ https://github.com/flamego/flamego ## 结构体参数映射问题 https://github.com/flamego/binding/ ## 注意route path 和双斜杠问题 ![img.png](assets/img/flamego-route.png) 双斜杠也是直接报错的 ![img.png](assets/img/double-slash.png) # xorm 框架 https://xorm.io/zh/docs/ https://gitea.com/xorm/xorm # 新建工程 初始化一个工程,会自动新建一个go.mod文件。 ```shell go mod init flamego-study ``` ```shell go install github.com/flamego/flamego@latest ``` 或者 ```shell go get github.com/flamego/flamego ``` 依赖下载 ```shell go mod tidy ``` # docker https://hub.docker.com/_/golang/tags ```shell docker build -t your-image-name:your-tag . ``` ```shell docker run -p 2830:2830 your-image-name:your-tag ``` # 问题 ```go 2023/07/14 23:06:00 ERRO Binary was compiled with 'CGO_ENABLED=0', go-sqlite3 requires cgo to work. This is a stub ``` 解决办法 ```shell sudo apt install gcc -y ```