File tree Expand file tree Collapse file tree 3 files changed +7
-0
lines changed
Expand file tree Collapse file tree 3 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ require (
2828 github.com/mattn/go-colorable v0.0.9 // indirect
2929 github.com/mattn/go-isatty v0.0.3 // indirect
3030 github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b
31+ github.com/mitchellh/go-wordwrap v1.0.1
3132 github.com/olekukonko/tablewriter v0.0.3
3233 github.com/pkg/browser v0.0.0-20170505125900-c90ca0c84f15
3334 github.com/pkg/errors v0.8.0
Original file line number Diff line number Diff line change @@ -55,6 +55,8 @@ github.com/mattn/go-runewidth v0.0.6 h1:V2iyH+aX9C5fsYCpK60U8BYIvmhqxuOL3JZcqc1N
5555github.com/mattn/go-runewidth v0.0.6 /go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI =
5656github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b h1:j7+1HpAFS1zy5+Q4qx1fWh90gTKwiN4QCGoY9TWyyO4 =
5757github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b /go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE =
58+ github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0 =
59+ github.com/mitchellh/go-wordwrap v1.0.1 /go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0 =
5860github.com/olekukonko/tablewriter v0.0.3 h1:i0LBnzgiChAWHJYTQAZJDOgf8MNxAVYZJ2m63SIDimI =
5961github.com/olekukonko/tablewriter v0.0.3 /go.mod h1:YZeBtGzYYEsCHp2LST/u/0NDwGkRoBtmn1cIWCJiS6M =
6062github.com/pkg/browser v0.0.0-20170505125900-c90ca0c84f15 h1:mrI+6Ae64Wjt+uahGe5we/sPS1sXjvfT3YjtawAVgps =
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ import (
2121 shellquote "github.com/kballard/go-shellquote"
2222 "github.com/mgutz/ansi"
2323 "github.com/olekukonko/tablewriter"
24+ wordwrap "github.com/mitchellh/go-wordwrap"
2425 "golang.org/x/crypto/ssh/terminal"
2526)
2627
@@ -191,6 +192,9 @@ func TemplateProcessor() *template.Template {
191192 "dateFormat" : func (format string , content string ) (string , error ) {
192193 return dateFormat (format , content )
193194 },
195+ "wrap" : func (width uint , content string ) string {
196+ return wordwrap .WrapString (content , width )
197+ },
194198 }
195199 return template .New ("gojira" ).Funcs (sprig .GenericFuncMap ()).Funcs (funcs )
196200}
You can’t perform that action at this time.
0 commit comments