Fix comments
This commit is contained in:
parent
c9ee6655ca
commit
356e6cd8db
5 changed files with 8 additions and 8 deletions
|
|
@ -52,7 +52,7 @@ srv.Handle("POST /webhook", srv.TrackWork(myWebhookHandler))
|
||||||
log.Fatal(srv.ListenAndServe(":8080"))
|
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
|
pick non-overlapping paths. Custom handlers are not wrapped by the
|
||||||
load-tracking middleware unless you opt in via `TrackWork`.
|
load-tracking middleware unless you opt in via `TrackWork`.
|
||||||
|
|
||||||
|
|
@ -74,7 +74,7 @@ type CheckerInteractive interface {
|
||||||
pipeline, and returns a consolidated HTML page.
|
pipeline, and returns a consolidated HTML page.
|
||||||
|
|
||||||
`ParseForm` is where the checker replaces what happyDomain would normally
|
`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.
|
own DNS queries from the human-supplied inputs.
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
|
||||||
|
|
@ -226,7 +226,7 @@ func TestCheck_NoReporters(t *testing.T) {
|
||||||
|
|
||||||
// bareInteractiveProvider implements only the required interfaces
|
// bareInteractiveProvider implements only the required interfaces
|
||||||
// (ObservationProvider, CheckerDefinitionProvider, CheckerInteractive)
|
// (ObservationProvider, CheckerDefinitionProvider, CheckerInteractive)
|
||||||
// — no reporters.
|
//, no reporters.
|
||||||
type bareInteractiveProvider struct {
|
type bareInteractiveProvider struct {
|
||||||
key ObservationKey
|
key ObservationKey
|
||||||
def *CheckerDefinition
|
def *CheckerDefinition
|
||||||
|
|
|
||||||
|
|
@ -74,7 +74,7 @@ func TestRegisterExternalizableChecker_AppendsEndpointOnce(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Second registration of the same definition pointer must NOT append a
|
// 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.
|
// the append, otherwise we silently mutate the live definition.
|
||||||
RegisterExternalizableChecker(c)
|
RegisterExternalizableChecker(c)
|
||||||
if n := len(c.Options.AdminOpts); n != 1 {
|
if n := len(c.Options.AdminOpts); n != 1 {
|
||||||
|
|
|
||||||
|
|
@ -171,7 +171,7 @@ func (s *Server) ListenAndServe(addr string) error {
|
||||||
|
|
||||||
// Close stops the background load-average sampler goroutine. It is safe to
|
// 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
|
// 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 {
|
func (s *Server) Close() error {
|
||||||
s.closeOnce.Do(func() {
|
s.closeOnce.Do(func() {
|
||||||
s.cancelSampler()
|
s.cancelSampler()
|
||||||
|
|
|
||||||
|
|
@ -430,7 +430,7 @@ func TestServer_Evaluate_RulePreservesCode(t *testing.T) {
|
||||||
|
|
||||||
func TestServer_Report_HTML(t *testing.T) {
|
func TestServer_Report_HTML(t *testing.T) {
|
||||||
p := &testProvider{
|
p := &testProvider{
|
||||||
key: "test",
|
key: "test",
|
||||||
definition: &CheckerDefinition{ID: "test-checker", Rules: []CheckRule{}},
|
definition: &CheckerDefinition{ID: "test-checker", Rules: []CheckRule{}},
|
||||||
htmlFn: func(raw json.RawMessage) (string, error) {
|
htmlFn: func(raw json.RawMessage) (string, error) {
|
||||||
return "<p>hello</p>", nil
|
return "<p>hello</p>", nil
|
||||||
|
|
@ -454,7 +454,7 @@ func TestServer_Report_HTML(t *testing.T) {
|
||||||
|
|
||||||
func TestServer_Report_Metrics(t *testing.T) {
|
func TestServer_Report_Metrics(t *testing.T) {
|
||||||
p := &testProvider{
|
p := &testProvider{
|
||||||
key: "test",
|
key: "test",
|
||||||
definition: &CheckerDefinition{ID: "test-checker", Rules: []CheckRule{}},
|
definition: &CheckerDefinition{ID: "test-checker", Rules: []CheckRule{}},
|
||||||
}
|
}
|
||||||
srv := newTestServer(p)
|
srv := newTestServer(p)
|
||||||
|
|
@ -478,7 +478,7 @@ func TestServer_Report_Metrics(t *testing.T) {
|
||||||
func TestServer_Report_Related(t *testing.T) {
|
func TestServer_Report_Related(t *testing.T) {
|
||||||
var gotRelated []RelatedObservation
|
var gotRelated []RelatedObservation
|
||||||
p := &testProvider{
|
p := &testProvider{
|
||||||
key: "test",
|
key: "test",
|
||||||
definition: &CheckerDefinition{ID: "test-checker", Rules: []CheckRule{}},
|
definition: &CheckerDefinition{ID: "test-checker", Rules: []CheckRule{}},
|
||||||
}
|
}
|
||||||
// Replace htmlFn with one that peeks at a related key. We can't do that
|
// Replace htmlFn with one that peeks at a related key. We can't do that
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue