File: 000-fixes-for-updated-tablewriter.patch

package info (click to toggle)
golang-github-rubenv-sql-migrate 0.0~git20191213.0633851-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 292 kB
  • sloc: sh: 42; makefile: 4; sql: 4
file content (19 lines) | stat: -rw-r--r-- 825 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
From: Mathias Gibbens <gibmat@debian.org>
Description: API updates for the newer tablewriter package, following hints from https://github.com/olekukonko/tablewriter/blob/master/MIGRATION.md. Not forwarded because the current package version is so ancient.
Forwarded: not-needed
diff --git a/sql-migrate/command_status.go b/sql-migrate/command_status.go
index e3c5d21..57c3ed8 100644
--- a/sql-migrate/command_status.go
+++ b/sql-migrate/command_status.go
@@ -69,9 +69,8 @@ func (c *StatusCommand) Run(args []string) int {
 		return 1
 	}
 
-	table := tablewriter.NewWriter(os.Stdout)
-	table.SetHeader([]string{"Migration", "Applied"})
-	table.SetColWidth(60)
+	table := tablewriter.NewTable(os.Stdout, tablewriter.WithColumnMax(60))
+	table.Header([]string{"Migration", "Applied"})
 
 	rows := make(map[string]*statusRow)