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

Method Write

cli/config/file.go:90–95  ·  view source on GitHub ↗

Write writes the string to the file.

(s string)

Source from the content-addressed store, hash-verified

88
89// Write writes the string to the file.
90func (f File) Write(s string) error {
91 if f == "" {
92 return xerrors.Errorf("empty file path")
93 }
94 return write(string(f), 0o600, []byte(s))
95}
96
97// Read reads the file to a string. All leading and trailing whitespace
98// is removed.

Callers

nothing calls this directly

Calls 2

writeFunction · 0.70
ErrorfMethod · 0.45

Tested by

no test coverage detected