MCPcopy Index your code
hub / github.com/coder/coder / URL

Method URL

coderd/healthcheck/health/model.go:85–100  ·  view source on GitHub ↗

URL returns a link to the admin/monitoring/health-check docs page for the given Message. NOTE: if using a custom docs URL, specify base.

(base string)

Source from the content-addressed store, hash-verified

83// URL returns a link to the admin/monitoring/health-check docs page for the given Message.
84// NOTE: if using a custom docs URL, specify base.
85func (m Message) URL(base string) string {
86 var codeAnchor string
87 if m.Code == "" {
88 codeAnchor = strings.ToLower(string(CodeUnknown))
89 } else {
90 codeAnchor = strings.ToLower(string(m.Code))
91 }
92
93 if base == "" {
94 base = docsURLDefault
95 return fmt.Sprintf("%s/admin/monitoring/health-check#%s", base, codeAnchor)
96 }
97
98 // We don't assume that custom docs URLs are versioned.
99 return fmt.Sprintf("%s/admin/monitoring/health-check#%s", base, codeAnchor)
100}
101
102// Code is a stable identifier used to link to documentation.
103// @typescript-generate Code

Callers 5

Test_MessageURLFunction · 0.95
initFunction · 0.45
ShowAuthorizePageFunction · 0.45

Calls

no outgoing calls

Tested by 3

Test_MessageURLFunction · 0.76