随笔分类 - Golang
Golang
摘要:准备工作: 定义结构体:Student import ( "fmt" "reflect") type Student struct { StudentId string `json:"sid"` StudentName string `json:"sname"` StudentClass strin
阅读全文
摘要:beego 存在三种方式的路由:固定路由、正则路由、自动路由 基础路由 从 beego 1.2 版本开始支持了基本的 RESTful 函数式路由,应用中的大多数路由都会定义在 routers/router.go 文件中。最简单的 beego 路由由 URI 和闭包函数组成。 基本 GET 路由 be
阅读全文
摘要:1.golang 官网下载很慢: 中科大镜像:http://mirrors.ustc.edu.cn/golang/ 2.go get 下载依赖很慢的问题: https://goproxy.io/zh/ 3.go mod 使用 1.创建文件:在目录下 使用 go mod init +模块名 2.启动项
阅读全文