Browse Source

默认版本

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

6
.drone.yml

@ -9,9 +9,9 @@ steps:
use_cache: true
username: [email protected]
password: l4rQkKdtIOlHKkTv
# auto_tag: true
tags:
- v3
auto_tag: true
# tags:
# - v3
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]-[v3]\n"+ipStr)
context.String(http.StatusOK, "[GET]-[API]-[latest]\n"+ipStr)
})
app.POST("/hello", func(context *gin.Context) {
context.String(http.StatusOK, "[POST]-[API]-[v3]\n"+ipStr)
context.String(http.StatusOK, "[POST]-[API]-[latest]\n"+ipStr)
})
app.GET("/ip", func(context *gin.Context) {

Loading…
Cancel
Save