|
|
|
@ -103,12 +103,14 @@ func main() {
|
|
|
|
|
app := gin.Default() |
|
|
|
|
initNacos() |
|
|
|
|
|
|
|
|
|
ipStr := strings.Join(getIps(), ",") |
|
|
|
|
|
|
|
|
|
app.GET("/hello", func(context *gin.Context) { |
|
|
|
|
context.String(http.StatusOK, "[GET]-[API]-v1"+port) |
|
|
|
|
context.String(http.StatusOK, "[GET]-[API]-[v1]\n"+ipStr) |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
app.POST("/hello", func(context *gin.Context) { |
|
|
|
|
context.String(http.StatusOK, "[POST]-[API]-v1"+port) |
|
|
|
|
context.String(http.StatusOK, "[POST]-[API]-[v1]\n"+ipStr) |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
app.GET("/ip", func(context *gin.Context) { |
|
|
|
|