Hello World<\/p> \n
1> Gin\u662f\u4e00\u4e2agolang<\/a>\u7684\u5fae\u6846\u67b6\uff0c\u5c01\u88c5\u6bd4\u8f83\u4f18\u96c5\uff0cAPI\u53cb\u597d\u3002\u5177\u6709\u5feb\u901f\u7075\u6d3b\uff0c\u5bb9\u9519\u65b9\u4fbf\u7b49\u7279\u70b9\u3002Gin\u81ea\u8eab\u7684net\/http\u8db3\u591f\u7b80\u5355\uff0c\u6027\u80fd\u4e5f\u975e\u5e38\u4e0d\u9519\u3002<\/p> \n 2> \u5b89\u88c5Gin\u73af\u5883.\u5728\u547d\u540d\u884c\u4e2d\u8f93\u5165\u5982\u4e0b\u7684\u547d\u540d: go get github.com\/gin-gonic\/gin.<\/p> \n <\/p> \n <\/p> \n 3> \u521b\u5efa\u7b2c\u4e00\u4e2aGin\u9879\u76ee\uff0c\u65b0\u5efa\u4e00\u4e2aGinOne.go\u6587\u4ef6\u3002\u5176\u4ee3\u7801\u5982\u4e0b:<\/p> \n <\/p> \n \u3000\u3000<\/p> \n 4> \u7f16\u8bd1\u8fd0\u884c\u6548\u679c\u5982\u4e0b:<\/p> \n <\/p> \n <\/p> \n \u5728\u6d4f\u89c8\u5668\u4e2d\u8f93\u5165\u5982\u4e0b\u7684\u5730\u5740:localhost:8000,\u67e5\u770b\u6548\u679c<\/p> \n <\/p> \n <\/p> \n 5> \u4e0b\u4e00\u7ae0\u8bb2\u642d\u5efaGin\u7684web\u6846\u67b6\u3002<\/p>\n<\/div>","orderid":"0","title":"Gin-Go\u5b66\u4e60\u7b14\u8bb0\u4e00\uff1aHello World","smalltitle":"","mid":"0","fname":"GO","special_id":"0","bak_id":"0","info":"0","hits":"1263","pages":"1","comments":"0","posttime":"2017-12-18 12:36:42","list":"1513571802","username":"admin","author":"","copyfrom":"","copyfromurl":"","titlecolor":"","fonttype":"0","titleicon":"0","picurl":"http:\/\/images2017.cnblogs.com\/blog\/1290422\/201712\/1290422-20171218094435881-939613881.png","ispic":"1","yz":"1","yzer":"","yztime":"0","levels":"0","levelstime":"0","keywords":"Gin-Go<\/A> \u5b66\u4e60<\/A> \u7b14\u8bb0<\/A> Hello<\/A> World<\/A>","jumpurl":"","iframeurl":"","style":"","template":"a:3:{s:4:\"head\";s:0:\"\";s:4:\"foot\";s:0:\"\";s:8:\"bencandy\";s:0:\"\";}","target":"0","ip":"119.123.183.229","lastfid":"0","money":"0","buyuser":"","passwd":"","allowdown":"","allowview":"","editer":"","edittime":"0","begintime":"0","endtime":"0","description":"Gin-Go\u5b66\u4e60\u7b14\u8bb0\u4e00\uff1aHello World","lastview":"1709240423","digg_num":"0","digg_time":"0","forbidcomment":"0","ifvote":"0","heart":"","htmlname":"","city_id":"0"},"page":"1"}package main\n\nimport (\n \n"github.com\/gin-gonic\/gin" \n"net\/http"\n\n)\n\n\n\nfunc main(){\n \n \n\n router := gin.Default()\n\n \n\n router.GET("\/", func(c *gin.Context) {\n \n c.String(http.StatusOK, "Hello World")\n \n })\n \n router.Run(":8000")\n \n\n}\n<\/pre> \n <\/div> \n