mirror of
https://github.com/stefanprodan/podinfo.git
synced 2026-03-02 18:10:20 +00:00
- add swagger definitions for all API routes - self-host the swagger UI on `/swagger/` - serve swagger spec on `/swagger.json`
15 lines
283 B
Go
15 lines
283 B
Go
package api
|
|
|
|
import (
|
|
"net/http"
|
|
)
|
|
|
|
// Panic godoc
|
|
// @Summary Panic
|
|
// @Description crashes the process with exit code 255
|
|
// @Tags HTTP API
|
|
// @Router /panic [get]
|
|
func (s *Server) panicHandler(w http.ResponseWriter, r *http.Request) {
|
|
s.logger.Panic("Panic command received")
|
|
}
|