mirror of
https://github.com/Threnklyn/jira.git
synced 2026-05-18 20:23:28 +02:00
use stdout to determin output terminal size
This commit is contained in:
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
var log = logging.MustGetLogger("jira")
|
||||
|
||||
const VERSION = "1.0.0"
|
||||
const VERSION = "1.0.1"
|
||||
|
||||
type Jira struct {
|
||||
Endpoint string `json:"endpoint,omitempty" yaml:"endpoint,omitempty"`
|
||||
|
||||
@@ -68,7 +68,7 @@ func TemplateProcessor() *template.Template {
|
||||
return string(bytes), nil
|
||||
},
|
||||
"termWidth": func() int {
|
||||
w, _, err := terminal.GetSize(int(os.Stdin.Fd()))
|
||||
w, _, err := terminal.GetSize(int(os.Stdout.Fd()))
|
||||
if err == nil {
|
||||
return w
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user