summaryrefslogtreecommitdiff
path: root/internal/cli/jobs/render.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/cli/jobs/render.go')
-rw-r--r--internal/cli/jobs/render.go22
1 files changed, 22 insertions, 0 deletions
diff --git a/internal/cli/jobs/render.go b/internal/cli/jobs/render.go
new file mode 100644
index 00000000..c9f71e2d
--- /dev/null
+++ b/internal/cli/jobs/render.go
@@ -0,0 +1,22 @@
+package jobs
+
+import (
+ "io"
+
+ "github.com/olekukonko/tablewriter"
+)
+
+// JobsCommandsRender uses console renderer to show jobs
+func renderPipelines(writer io.Writer, pipelines []string) *tablewriter.Table {
+ tw := tablewriter.NewWriter(writer)
+ tw.SetAutoWrapText(false)
+ tw.SetHeader([]string{"Pipeline(s)"})
+ tw.SetColWidth(50)
+ tw.SetAlignment(tablewriter.ALIGN_LEFT)
+
+ for i := 0; i < len(pipelines); i++ {
+ tw.Append([]string{pipelines[i]})
+ }
+
+ return tw
+}