首页
  • go 学习

    package main
    
    import (
        "fmt"
        "io/ioutil"
        "log"
        "net/http"
    
        "github.com/gin-gonic/gin"
    )
    
    // Phone asd
    type Phone interface {
        call()
    }
    
    // MiPhone asd
    type MiPhone struct {
    }
    
    阅读全文
  • go 设置代理

    go env -w GOPROXY=https://goproxy.cn,direct
    go mod init api
    go get -u github.com/gin-gonic/gin
    package main
    
    import (
        "fmt"
    
        "github.com/gin-gonic/gin"
    )
    
    func main() {
    阅读全文
  • go-gin框架基本接口

    package main
    
    import (
        "fmt"
        "github.com/gin-gonic/gin"
        "net/http"
    )
    
    type User struct {
        Name string `json:"name"`
        Age  int    `json:"age"`
    }
    
    func main() {
    
        r := gin.Default()
    
    阅读全文
  • go 学习 包的导出

    | - src
        - index.go
        - libs
            - index.go

    libs / index.go

    package libs // 属于哪个包
    //  方法名 首字母 大写才能导出
    func Count( a int, b int ) int {
        return a + b
    }
    

    index.go

    阅读全文
  • 1
Taoqun
陶群
1994-09-07
taoquns@foxmail.com
前端开发
南京

文章分类

Mac
算法
前端
python
golang
mysql
node
linux
随笔
生活
游记

我的作品

记录体重Pro(小程序)
闲蝉科技

其他推荐

2018-04-26
webpack 开启 gzip 打包 减小文件大小
安装 hiper 报错 记录
go-gin框架基本接口
go 设置代理
git 规范
electron 读取剪贴板文件
h5移动端rem使用750设计稿
开发者:Taoqun

备案/许可证编号为:皖ICP备17027395号

闲蝉科技
Ron · 一个无人问津的小站
小印章