Get
should return a value RVV-A000660 c.Status(http.StatusOK)
61}
62
63func (app *Application) GetApiDocs(c *gin.Context) {64 swagger, err := api.GetSwagger()
65 if err != nil {
66 c.AbortWithStatus(http.StatusInternalServerError)
56 }
57 app.conn.Publish(jsonData, repo)
58}
59func (app *Application) GetLiveness(c *gin.Context) {60 c.Status(http.StatusOK)
61}
62
Typically, functions with names prefixed with Get are supposed to return a value.
func GetData(n int) {
fmt.Println(10 - n)
}
func GetData(n int) int {
fmt.Println(10 - n)
return 10 - n
}