MCPcopy Index your code
hub / github.com/mislav/hub / writeContent

Method writeContent

github/editor.go:120–129  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

118}
119
120func (e *Editor) writeContent() (err error) {
121 if !e.isFileExist() {
122 err = ioutil.WriteFile(e.File, []byte(e.Message), 0644)
123 if err != nil {
124 return
125 }
126 }
127
128 return
129}
130
131func (e *Editor) isFileExist() bool {
132 _, err := os.Stat(e.File)

Callers 1

openAndEditMethod · 0.95

Calls 1

isFileExistMethod · 0.95

Tested by

no test coverage detected