系列: Go
go
18 行
· 更新於 2026-04-18
health.go
Go/payment-gateway-challenge/internal/handlers/health.go
package handlers
import (
"net/http"
"github.com/labstack/echo/v4"
)
// Ping godoc
// @Summary Liveness probe
// @Description Returns plain text `pong` for load balancers and smoke tests.
// @Tags system
// @Produce text/plain
// @Success 200 {string} string "pong"
// @Router /ping [get]
func Ping(c echo.Context) error {
return c.String(http.StatusOK, "pong")
}
相關文章
Go
go
更新於 2026-04-18
main.go
main.go — go source code from the Go learning materials (Go/Baasid/cmd/hashpw/main.go).
閱讀文章 →
Go
go
更新於 2026-04-18
main.go
main.go — go source code from the Go learning materials (Go/Baasid/cmd/server/main.go).
閱讀文章 →
Go
go
更新於 2026-04-18
docs.go
docs.go — go source code from the Go learning materials (Go/Baasid/docs/docs.go).
閱讀文章 →
Go
go
更新於 2026-04-18
jwt.go
jwt.go — go source code from the Go learning materials (Go/Baasid/internal/auth/jwt.go).
閱讀文章 →
Go
go
更新於 2026-04-18
password.go
password.go — go source code from the Go learning materials (Go/Baasid/internal/auth/password.go).
閱讀文章 →
Go
go
更新於 2026-04-18
password_test.go
password_test.go — go source code from the Go learning materials (Go/Baasid/internal/auth/password_test.go).
閱讀文章 →