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

Method lightweightCopy

lib/crontab.go:917–927  ·  view source on GitHub ↗

lightweightCrontab creates a copy of Crontab without the Lines field to prevent circular references

()

Source from the content-addressed store, hash-verified

915
916// lightweightCrontab creates a copy of Crontab without the Lines field to prevent circular references
917func (c *Crontab) lightweightCopy() Crontab {
918 return Crontab{
919 User: c.User,
920 IsUserCrontab: c.IsUserCrontab,
921 Filename: c.Filename,
922 Lines: nil, // Explicitly nil to break circular reference
923 TimezoneLocationName: c.TimezoneLocationName,
924 Shell: c.Shell,
925 UsesSixFieldExpressions: c.UsesSixFieldExpressions,
926 }
927}
928
929// buildCrontabCommand builds a crontab command with appropriate user flag if needed
930func (c Crontab) buildCrontabCommand(args ...string) *exec.Cmd {

Callers 2

ParseMethod · 0.95

Calls

no outgoing calls

Tested by 1