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

其他推荐

html 安全Meta
nginx 常规命令操作
vsvode 快捷键
iphone ios下 input触发 软键盘留白
typescript 基本类型
npm 自建 包
npm 切换淘宝源和npm源
centos 常用命令
gorm 的一些配置
leetCode 取中位数
开发者:Taoqun

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

闲蝉科技