MCPcopy Create free account
hub / github.com/cronitorio/cronitor-cli / Write

Method Write

lib/crontab.go:261–272  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

259}
260
261func (c Crontab) Write() string {
262 var cl []string
263 for _, line := range c.Lines {
264 cl = append(cl, line.Write())
265 }
266
267 result := strings.Join(cl, "\n")
268 if result != "" && !strings.HasSuffix(result, "\n") {
269 result += "\n"
270 }
271 return result
272}
273
274func (c *Crontab) Save(crontabLines string) error {
275 if c.IsUserCrontab {

Callers

nothing calls this directly

Calls 1

WriteMethod · 0.45

Tested by

no test coverage detected