Fix comments

This commit is contained in:
nemunaire 2026-04-24 10:01:57 +07:00
commit 356e6cd8db
5 changed files with 8 additions and 8 deletions

View file

@ -52,7 +52,7 @@ srv.Handle("POST /webhook", srv.TrackWork(myWebhookHandler))
log.Fatal(srv.ListenAndServe(":8080"))
```
Patterns that collide with built-in routes panic at registration
Patterns that collide with built-in routes panic at registration:
pick non-overlapping paths. Custom handlers are not wrapped by the
load-tracking middleware unless you opt in via `TrackWork`.
@ -74,7 +74,7 @@ type CheckerInteractive interface {
pipeline, and returns a consolidated HTML page.
`ParseForm` is where the checker replaces what happyDomain would normally
auto-fill (zone records, service payload, …) typically by issuing its
auto-fill (zone records, service payload, …), typically by issuing its
own DNS queries from the human-supplied inputs.
## License

View file

@ -226,7 +226,7 @@ func TestCheck_NoReporters(t *testing.T) {
// bareInteractiveProvider implements only the required interfaces
// (ObservationProvider, CheckerDefinitionProvider, CheckerInteractive)
// — no reporters.
//, no reporters.
type bareInteractiveProvider struct {
key ObservationKey
def *CheckerDefinition

View file

@ -74,7 +74,7 @@ func TestRegisterExternalizableChecker_AppendsEndpointOnce(t *testing.T) {
}
// Second registration of the same definition pointer must NOT append a
// second "endpoint" AdminOpt the duplicate check has to fire before
// second "endpoint" AdminOpt, the duplicate check has to fire before
// the append, otherwise we silently mutate the live definition.
RegisterExternalizableChecker(c)
if n := len(c.Options.AdminOpts); n != 1 {

View file

@ -171,7 +171,7 @@ func (s *Server) ListenAndServe(addr string) error {
// Close stops the background load-average sampler goroutine. It is safe to
// call multiple times; subsequent calls are no-ops. Close does not shut down
// any underlying http.Server callers own that lifecycle.
// any underlying http.Server, callers own that lifecycle.
func (s *Server) Close() error {
s.closeOnce.Do(func() {
s.cancelSampler()

View file

@ -430,7 +430,7 @@ func TestServer_Evaluate_RulePreservesCode(t *testing.T) {
func TestServer_Report_HTML(t *testing.T) {
p := &testProvider{
key: "test",
key: "test",
definition: &CheckerDefinition{ID: "test-checker", Rules: []CheckRule{}},
htmlFn: func(raw json.RawMessage) (string, error) {
return "<p>hello</p>", nil
@ -454,7 +454,7 @@ func TestServer_Report_HTML(t *testing.T) {
func TestServer_Report_Metrics(t *testing.T) {
p := &testProvider{
key: "test",
key: "test",
definition: &CheckerDefinition{ID: "test-checker", Rules: []CheckRule{}},
}
srv := newTestServer(p)
@ -478,7 +478,7 @@ func TestServer_Report_Metrics(t *testing.T) {
func TestServer_Report_Related(t *testing.T) {
var gotRelated []RelatedObservation
p := &testProvider{
key: "test",
key: "test",
definition: &CheckerDefinition{ID: "test-checker", Rules: []CheckRule{}},
}
// Replace htmlFn with one that peeks at a related key. We can't do that