ci: fix setup-go cache and refresh docs
setup-go@v5 aborts when go.sum is missing, and this stdlib-only module has none. Disable the action cache and cap the job at 10 minutes. Lead the README with what the service does and a runnable quick start, fix stale contract and cache comments, and remove comments that only restate the code.
This commit is contained in:
1 parent
80c8eeb0b9
commit
f4693af748
12 files changed
+66
-26
No files matched your search
@@ -1,5 +1,5 @@
|
||||
// Package api wires the HTTP handlers, scenario state, SSE hub and cache
|
||||
// fallback into the Go service described by CONTRACT.md.
|
||||
// fallback into the Go service.
|
||||
package api
|
||||
|
||||
import (
|
||||
@@ -108,6 +108,8 @@ var methodTable = map[string][]string{
|
||||
"/api/stream": {"GET"},
|
||||
}
|
||||
|
||||
// routeCheck keeps unknown routes and methods in the JSON error envelope;
|
||||
// ServeMux would otherwise answer them in plain text.
|
||||
func (s *Server) routeCheck(next http.Handler) http.Handler {
|
||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
methods, ok := methodTable[r.URL.Path]
|
||||
|
||||
Reference in new issue
Block a user