Browse Source

打包v2版本

master
李寻欢 9 months ago
parent
commit
d089b8a7ac
  1. 2
      .drone.yml
  2. 4
      main.go

2
.drone.yml

@ -11,7 +11,7 @@ steps:
password: l4rQkKdtIOlHKkTv
# auto_tag: true
tags:
- v1
- v2
when:
event: push
branch: master

4
main.go

@ -106,11 +106,11 @@ func main() {
ipStr := strings.Join(getIps(), ",")
app.GET("/hello", func(context *gin.Context) {
context.String(http.StatusOK, "[GET]-[API]-[v1]\n"+ipStr)
context.String(http.StatusOK, "[GET]-[API]-[v2]\n"+ipStr)
})
app.POST("/hello", func(context *gin.Context) {
context.String(http.StatusOK, "[POST]-[API]-[v1]\n"+ipStr)
context.String(http.StatusOK, "[POST]-[API]-[v2]\n"+ipStr)
})
app.GET("/ip", func(context *gin.Context) {

Loading…
Cancel
Save