github.com/anycable/anycable-go@v1.5.1/server/health_handler.go (about)

     1  package server
     2  
     3  import "net/http"
     4  
     5  // https://www.youtube.com/watch?v=I_izvAbhExY
     6  var healthMsg = []byte("Ah, ha, ha, ha, stayin' alive, stayin' alive.")
     7  
     8  // HealthHandler always reponds with 200 status
     9  func HealthHandler(w http.ResponseWriter, _ *http.Request) {
    10  	w.WriteHeader(http.StatusOK)
    11  	w.Write(healthMsg) //nolint:errcheck
    12  }