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

Function displaySchedule

cli/schedule.go:338–348  ·  view source on GitHub ↗
(ws codersdk.Workspace, out io.Writer)

Source from the content-addressed store, hash-verified

336}
337
338func displaySchedule(ws codersdk.Workspace, out io.Writer) error {
339 rows := []WorkspaceListRow{WorkspaceListRowFromWorkspace(time.Now(), ws)}
340 rendered, err := cliui.DisplayTable(rows, "workspace", []string{
341 "workspace", "starts at", "starts next", "stops after", "stops next",
342 })
343 if err != nil {
344 return err
345 }
346 _, err = fmt.Fprintln(out, rendered)
347 return err
348}
349
350// scheduleListRow is a row in the schedule list.
351// this is required for proper JSON output.

Callers 3

scheduleStartMethod · 0.85
scheduleStopMethod · 0.85
scheduleExtendMethod · 0.85

Calls 2

DisplayTableFunction · 0.92

Tested by

no test coverage detected