# go_web_template **Repository Path**: home_robertzhai/go_web_template ## Basic Information - **Project Name**: go_web_template - **Description**: 一键快速生成golang 基于gin框架 的api server project 示例代码,提示研发效能 - **Primary Language**: Go - **License**: MulanPSL-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-01-09 - **Last Updated**: 2024-01-23 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # go_web_template #### 介绍 一键快速生成golang 基于gin框架 的api server project 示例代码,提示研发效能 #### 运行 - 基于alpine镜像 ``` make docker_start_alpine ``` - 基于centos7镜像 ``` make docker_start_centos7 ``` ### golang 安装和配置 - [https://golang.google.cn/doc/install](https://golang.google.cn/doc/install) - 环境配置 ``` export GOROOT=/usr/local/go/go20 export GOPATH=/Users/robert/gopath export GOPROXY="https://goproxy.cn,direct" export GO111MODULE=on export GOSUMDB=off ``` ### go doc 查看package和method的使用文档,类似linux的man - go doc strconv - go doc strconv Itoa ### godoc 本地文档(默认没有安装,需要安装) - 安装 ``` go install golang.org/x/tools/cmd/godoc@latest ``` - 启动 ``` godoc -http=:8080 ``` ### env - go env ### quick start -make debug - http://127.0.0.1:8081/go_web_template/api/demo/hello ```json {"status":"success","message":"","data":{"echo":"demo"}} ```