首页
  • 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(小程序)
闲蝉科技

其他推荐

解决网页移动端input 输入框 ios 键盘弹窗问题
html 安全Meta
webpack 开启 gzip 打包 减小文件大小
react 添加代理 proxy
go 学习
git 规范
scp 远程传输
生活随记·游记《金陵小镇·燕集里》
前端算法,深度遍历和广度遍历
keepAlive保存滚动位置
开发者:Taoqun

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

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