pms/cicd/main.go

23 lines
427 B
Go
Raw Normal View History

2024-08-17 18:46:13 +08:00
package main
import (
"github.com/gin-gonic/gin"
"fmt"
)
//go:generate go env -w GO111MODULE=on
//go:generate go env -w GOPROXY=https://goproxy.cn,direct
//go:generate go mod tidy
//go:generate go mod download
func main() {
router := gin.Default()
router.GET("/", func(c *gin.Context) {
Q := c.Query("q")
c.JSON(200, gin.H{
"message": "Hello "+Q,
})
fmt.Println("Hello "+Q+"……")
})
router.Run(":8080")
}