go开发开发环境

野生程序员2022年6月14日
小于 1 分钟

开发环境

https://go.dev/dl/open in new window

下载安装就好了

中文文档

https://studygolang.com/pkgdocopen in new window

中文论坛

https://studygolang.com/open in new window

func main() {
    // 1.创建路由
   r := gin.Default()
   // 2.绑定路由规则,执行的函数
   // gin.Context,封装了request和response
   r.GET("/", func(c *gin.Context) {
      c.String(http.StatusOK, "hello World!")
   })
   // 3.监听端口,默认在8080
   // Run("里面不指定端口号默认为8080") 
   r.Run(":8000")
}

指针

指针操作值

字符串二维数组

上次编辑于: 2022/6/23 08:42:20
贡献者: qq547176052
评论
Powered by Waline v2.6.3