mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
18 lines
277 B
Go
18 lines
277 B
Go
package handler
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"gopkg.in/gin-gonic/gin.v1"
|
|
|
|
"yunion.io/x/pkg/util/version"
|
|
)
|
|
|
|
func InstallVersionHandler(r *gin.Engine) {
|
|
r.GET("/version", versionHandler)
|
|
}
|
|
|
|
func versionHandler(c *gin.Context) {
|
|
c.String(http.StatusOK, version.GetShortString())
|
|
}
|