From b5433c338e758ec7e14ddf5baf78ac6bcd03dec0 Mon Sep 17 00:00:00 2001 From: Phodal Huang Date: Thu, 9 Jan 2020 17:09:40 +0800 Subject: [PATCH] styles: set width for suggest --- README.md | 1 + cmd/cmd_util/coca_output.go | 1 + cmd/testdata/suggest_normal.txt | 13 +++++-------- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index a1e04cf..f3e73bc 100644 --- a/README.md +++ b/README.md @@ -482,6 +482,7 @@ results: - Git - [x] Revs Counts - [x] Summary + - [ ] [git-quick-stats](https://github.com/arzzen/git-quick-stats) - Concept - [x] words NLP - [ ] to domain diff --git a/cmd/cmd_util/coca_output.go b/cmd/cmd_util/coca_output.go index 762fc5e..c49af86 100644 --- a/cmd/cmd_util/coca_output.go +++ b/cmd/cmd_util/coca_output.go @@ -9,5 +9,6 @@ func NewOutput(output io.Writer) *tablewriter.Table { table := tablewriter.NewWriter(output) table.SetBorders(tablewriter.Border{Left: true, Top: false, Right: true, Bottom: false}) table.SetCenterSeparator("|") + table.SetColWidth(80) return table } diff --git a/cmd/testdata/suggest_normal.txt b/cmd/testdata/suggest_normal.txt index 4f295cc..c5b8a14 100644 --- a/cmd/testdata/suggest_normal.txt +++ b/cmd/testdata/suggest_normal.txt @@ -1,8 +1,5 @@ -| CLASS | PATTERN | REASON | -|------------|------------------|--------------------------------| -| BeeBuilder | factory, builder | too many constructor, too many | -| | | parameters | -| Insect | factory | too many constructor | -| Bee | factory, builder | complex constructor, too | -| | | many constructor, too many | -| | | parameters | +| CLASS | PATTERN | REASON | +|------------|------------------|----------------------------------------------------------------| +| BeeBuilder | factory, builder | too many constructor, too many parameters | +| Insect | factory | too many constructor | +| Bee | factory, builder | complex constructor, too many constructor, too many parameters | -- GitLab