MCPcopy Create free account
hub / github.com/cli/cli / Validate

Method Validate

internal/safepaths/root.go:158–161  ·  view source on GitHub ↗

Validate checks name using the same lexical rules as [ValidateChild].

(name string)

Source from the content-addressed store, hash-verified

156
157// Validate checks name using the same lexical rules as [ValidateChild].
158func (r *Root) Validate(name string) error {
159 _, err := r.localPath(name)
160 return err
161}
162
163// Create creates a new file beneath the root. Creation is exclusive unless an
164// existing regular file is safely opened and truncated for replacement.

Callers 6

buildAuthTokenFormMethod · 0.45
AuthTokenMethod · 0.45
ConfirmDeletionMethod · 0.45
InputHostnameMethod · 0.45

Calls 1

localPathMethod · 0.95

Tested by

no test coverage detected