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

Method mustNotEmpty

cli/config/file.go:23–27  ·  view source on GitHub ↗

mustNotBeEmpty prevents us from accidentally writing configuration to the current directory. This is primarily valuable in development, where we may accidentally use an empty root.

()

Source from the content-addressed store, hash-verified

21// current directory. This is primarily valuable in development, where we may
22// accidentally use an empty root.
23func (r Root) mustNotEmpty() {
24 if r == "" {
25 panic("config root must not be empty")
26 }
27}
28
29func (r Root) Session() File {
30 r.mustNotEmpty()

Callers 8

SessionMethod · 0.95
ReplicaIDMethod · 0.95
URLMethod · 0.95
OrganizationMethod · 0.95
DotfilesURLMethod · 0.95
PostgresPathMethod · 0.95
PostgresPasswordMethod · 0.95
PostgresPortMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected