summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiguel Mota <miguelmota2@gmail.com>2018-05-12 12:42:48 -0700
committerMiguel Mota <miguelmota2@gmail.com>2018-05-12 12:42:48 -0700
commit6e25a81cda10ff06043eae353906de4af0b17fa7 (patch)
tree612fa412c91027d530b8df3b3217bbc7a852833e
parent48f0067b8242ea60d5981152977c381a2aa13c6e (diff)
env var for /dev in/out1.0.2
-rw-r--r--com.github.miguelmota.Cointop.json3
-rw-r--r--pkg/gocui/attribute.go2
-rw-r--r--pkg/gocui/gocui.go2
-rw-r--r--pkg/gocui/keybinding.go2
-rw-r--r--pkg/gocui/view.go2
-rw-r--r--pkg/termbox/AUTHORS (renamed from vendor/github.com/nsf/termbox-go/AUTHORS)0
-rw-r--r--pkg/termbox/LICENSE (renamed from vendor/github.com/nsf/termbox-go/LICENSE)0
-rw-r--r--pkg/termbox/README.md (renamed from vendor/github.com/nsf/termbox-go/README.md)0
-rw-r--r--pkg/termbox/_demos/editbox.go (renamed from vendor/github.com/nsf/termbox-go/_demos/editbox.go)0
-rw-r--r--pkg/termbox/_demos/interrupt.go (renamed from vendor/github.com/nsf/termbox-go/_demos/interrupt.go)0
-rw-r--r--pkg/termbox/_demos/keyboard.go (renamed from vendor/github.com/nsf/termbox-go/_demos/keyboard.go)0
-rw-r--r--pkg/termbox/_demos/output.go (renamed from vendor/github.com/nsf/termbox-go/_demos/output.go)0
-rw-r--r--pkg/termbox/_demos/paint.go (renamed from vendor/github.com/nsf/termbox-go/_demos/paint.go)0
-rw-r--r--pkg/termbox/_demos/random_output.go (renamed from vendor/github.com/nsf/termbox-go/_demos/random_output.go)0
-rw-r--r--pkg/termbox/_demos/raw_input.go (renamed from vendor/github.com/nsf/termbox-go/_demos/raw_input.go)0
-rw-r--r--pkg/termbox/api.go (renamed from vendor/github.com/nsf/termbox-go/api.go)30
-rw-r--r--pkg/termbox/api_common.go (renamed from vendor/github.com/nsf/termbox-go/api_common.go)0
-rw-r--r--pkg/termbox/api_windows.go (renamed from vendor/github.com/nsf/termbox-go/api_windows.go)0
-rwxr-xr-xpkg/termbox/collect_terminfo.py (renamed from vendor/github.com/nsf/termbox-go/collect_terminfo.py)0
-rw-r--r--pkg/termbox/escwait.go (renamed from vendor/github.com/nsf/termbox-go/escwait.go)0
-rw-r--r--pkg/termbox/escwait_darwin.go (renamed from vendor/github.com/nsf/termbox-go/escwait_darwin.go)0
-rw-r--r--pkg/termbox/syscalls.go (renamed from vendor/github.com/nsf/termbox-go/syscalls.go)0
-rw-r--r--pkg/termbox/syscalls_darwin.go (renamed from vendor/github.com/nsf/termbox-go/syscalls_darwin.go)0
-rw-r--r--pkg/termbox/syscalls_darwin_amd64.go (renamed from vendor/github.com/nsf/termbox-go/syscalls_darwin_amd64.go)0
-rw-r--r--pkg/termbox/syscalls_dragonfly.go (renamed from vendor/github.com/nsf/termbox-go/syscalls_dragonfly.go)0
-rw-r--r--pkg/termbox/syscalls_freebsd.go (renamed from vendor/github.com/nsf/termbox-go/syscalls_freebsd.go)0
-rw-r--r--pkg/termbox/syscalls_linux.go (renamed from vendor/github.com/nsf/termbox-go/syscalls_linux.go)0
-rw-r--r--pkg/termbox/syscalls_netbsd.go (renamed from vendor/github.com/nsf/termbox-go/syscalls_netbsd.go)0
-rw-r--r--pkg/termbox/syscalls_openbsd.go (renamed from vendor/github.com/nsf/termbox-go/syscalls_openbsd.go)0
-rw-r--r--pkg/termbox/syscalls_windows.go (renamed from vendor/github.com/nsf/termbox-go/syscalls_windows.go)0
-rw-r--r--pkg/termbox/termbox.go (renamed from vendor/github.com/nsf/termbox-go/termbox.go)0
-rw-r--r--pkg/termbox/termbox_common.go (renamed from vendor/github.com/nsf/termbox-go/termbox_common.go)0
-rw-r--r--pkg/termbox/termbox_windows.go (renamed from vendor/github.com/nsf/termbox-go/termbox_windows.go)0
-rw-r--r--pkg/termbox/terminfo.go (renamed from vendor/github.com/nsf/termbox-go/terminfo.go)0
-rw-r--r--pkg/termbox/terminfo_builtin.go (renamed from vendor/github.com/nsf/termbox-go/terminfo_builtin.go)0
35 files changed, 27 insertions, 14 deletions
diff --git a/com.github.miguelmota.Cointop.json b/com.github.miguelmota.Cointop.json
index a0d846f..9256c11 100644
--- a/com.github.miguelmota.Cointop.json
+++ b/com.github.miguelmota.Cointop.json
@@ -14,7 +14,8 @@
"sources": [
{
"type": "git",
- "url": "https://github.com/miguelmota/cointop.git"
+ "url": "https://github.com/miguelmota/cointop.git",
+ "commit": "48f0067b8242ea60d5981152977c381a2aa13c6e"
}
]
}
diff --git a/pkg/gocui/attribute.go b/pkg/gocui/attribute.go
index bad758a..efcda08 100644
--- a/pkg/gocui/attribute.go
+++ b/pkg/gocui/attribute.go
@@ -4,7 +4,7 @@
package gocui
-import "github.com/nsf/termbox-go"
+import "github.com/miguelmota/cointop/pkg/termbox"
// Attribute represents a terminal attribute, like color, font style, etc. They
// can be combined using bitwise OR (|). Note that it is not possible to
diff --git a/pkg/gocui/gocui.go b/pkg/gocui/gocui.go
index 9499d3c..6df837c 100644
--- a/pkg/gocui/gocui.go
+++ b/pkg/gocui/gocui.go
@@ -7,7 +7,7 @@ package gocui
import (
"errors"
- "github.com/nsf/termbox-go"
+ "github.com/miguelmota/cointop/pkg/termbox"
)
var (
diff --git a/pkg/gocui/keybinding.go b/pkg/gocui/keybinding.go
index 03fe677..5d504cc 100644
--- a/pkg/gocui/keybinding.go
+++ b/pkg/gocui/keybinding.go
@@ -4,7 +4,7 @@
package gocui
-import "github.com/nsf/termbox-go"
+import "github.com/miguelmota/cointop/pkg/termbox"
// Keybidings are used to link a given key-press event with a handler.
type keybinding struct {
diff --git a/pkg/gocui/view.go b/pkg/gocui/view.go
index 42082f8..f7080f5 100644
--- a/pkg/gocui/view.go
+++ b/pkg/gocui/view.go
@@ -10,7 +10,7 @@ import (
"io"
"strings"
- "github.com/nsf/termbox-go"
+ "github.com/miguelmota/cointop/pkg/termbox"
)
// A View is a window. It maintains its own internal buffer and cursor
diff --git a/vendor/github.com/nsf/termbox-go/AUTHORS b/pkg/termbox/AUTHORS
index fe26fb0..fe26fb0 100644
--- a/vendor/github.com/nsf/termbox-go/AUTHORS
+++ b/pkg/termbox/AUTHORS
diff --git a/vendor/github.com/nsf/termbox-go/LICENSE b/pkg/termbox/LICENSE
index d9bc068..d9bc068 100644
--- a/vendor/github.com/nsf/termbox-go/LICENSE
+++ b/pkg/termbox/LICENSE
diff --git a/vendor/github.com/nsf/termbox-go/README.md b/pkg/termbox/README.md
index 40332bb..40332bb 100644
--- a/vendor/github.com/nsf/termbox-go/README.md
+++ b/pkg/termbox/README.md
diff --git a/vendor/github.com/nsf/termbox-go/_demos/editbox.go b/pkg/termbox/_demos/editbox.go
index e429080..e429080 100644
--- a/vendor/github.com/nsf/termbox-go/_demos/editbox.go
+++ b/pkg/termbox/_demos/editbox.go
diff --git a/vendor/github.com/nsf/termbox-go/_demos/interrupt.go b/pkg/termbox/_demos/interrupt.go
index 5534521..5534521 100644
--- a/vendor/github.com/nsf/termbox-go/_demos/interrupt.go
+++ b/pkg/termbox/_demos/interrupt.go
diff --git a/vendor/github.com/nsf/termbox-go/_demos/keyboard.go b/pkg/termbox/_demos/keyboard.go
index b6a258e..b6a258e 100644
--- a/vendor/github.com/nsf/termbox-go/_demos/keyboard.go
+++ b/pkg/termbox/_demos/keyboard.go
diff --git a/vendor/github.com/nsf/termbox-go/_demos/output.go b/pkg/termbox/_demos/output.go
index 2b9479b..2b9479b 100644
--- a/vendor/github.com/nsf/termbox-go/_demos/output.go
+++ b/pkg/termbox/_demos/output.go
diff --git a/vendor/github.com/nsf/termbox-go/_demos/paint.go b/pkg/termbox/_demos/paint.go
index fbafd18..fbafd18 100644
--- a/vendor/github.com/nsf/termbox-go/_demos/paint.go
+++ b/pkg/termbox/_demos/paint.go
diff --git a/vendor/github.com/nsf/termbox-go/_demos/random_output.go b/pkg/termbox/_demos/random_output.go
index efcf0b7..efcf0b7 100644
--- a/vendor/github.com/nsf/termbox-go/_demos/random_output.go
+++ b/pkg/termbox/_demos/random_output.go
diff --git a/vendor/github.com/nsf/termbox-go/_demos/raw_input.go b/pkg/termbox/_demos/raw_input.go
index 97a4897..97a4897 100644
--- a/vendor/github.com/nsf/termbox-go/_demos/raw_input.go
+++ b/pkg/termbox/_demos/raw_input.go
diff --git a/vendor/github.com/nsf/termbox-go/api.go b/pkg/termbox/api.go
index d530ab5..e5b9344 100644
--- a/vendor/github.com/nsf/termbox-go/api.go
+++ b/pkg/termbox/api.go
@@ -2,13 +2,16 @@
package termbox
-import "github.com/mattn/go-runewidth"
-import "fmt"
-import "os"
-import "os/signal"
-import "syscall"
-import "runtime"
-import "time"
+import (
+ "fmt"
+ "os"
+ "os/signal"
+ "runtime"
+ "syscall"
+ "time"
+
+ "github.com/mattn/go-runewidth"
+)
// public API
@@ -24,11 +27,20 @@ import "time"
func Init() error {
var err error
- out, err = os.OpenFile("/dev/tty", syscall.O_WRONLY, 0)
+ devin := os.Getenv("DEV_IN")
+ if devin == "" {
+ devin = "/dev/tty"
+ }
+ devout := os.Getenv("DEV_OUT")
+ if devout == "" {
+ devout = "/dev/tty"
+ }
+
+ out, err = os.OpenFile(devin, syscall.O_WRONLY, 0)
if err != nil {
return err
}
- in, err = syscall.Open("/dev/tty", syscall.O_RDONLY, 0)
+ in, err = syscall.Open(devout, syscall.O_RDONLY, 0)
if err != nil {
return err
}
diff --git a/vendor/github.com/nsf/termbox-go/api_common.go b/pkg/termbox/api_common.go
index 5ca1371..5ca1371 100644
--- a/vendor/github.com/nsf/termbox-go/api_common.go
+++ b/pkg/termbox/api_common.go
diff --git a/vendor/github.com/nsf/termbox-go/api_windows.go b/pkg/termbox/api_windows.go
index 7def30a..7def30a 100644
--- a/vendor/github.com/nsf/termbox-go/api_windows.go
+++ b/pkg/termbox/api_windows.go
diff --git a/vendor/github.com/nsf/termbox-go/collect_terminfo.py b/pkg/termbox/collect_terminfo.py
index 5e50975..5e50975 100755
--- a/vendor/github.com/nsf/termbox-go/collect_terminfo.py
+++ b/pkg/termbox/collect_terminfo.py
diff --git a/vendor/github.com/nsf/termbox-go/escwait.go b/pkg/termbox/escwait.go
index b7bbb89..b7bbb89 100644
--- a/vendor/github.com/nsf/termbox-go/escwait.go
+++ b/pkg/termbox/escwait.go
diff --git a/vendor/github.com/nsf/termbox-go/escwait_darwin.go b/pkg/termbox/escwait_darwin.go
index dde69b6..dde69b6 100644
--- a/vendor/github.com/nsf/termbox-go/escwait_darwin.go
+++ b/pkg/termbox/escwait_darwin.go
diff --git a/vendor/github.com/nsf/termbox-go/syscalls.go b/pkg/termbox/syscalls.go
index 4f52bb9..4f52bb9 100644
--- a/vendor/github.com/nsf/termbox-go/syscalls.go
+++ b/pkg/termbox/syscalls.go
diff --git a/vendor/github.com/nsf/termbox-go/syscalls_darwin.go b/pkg/termbox/syscalls_darwin.go
index 25b78f7..25b78f7 100644
--- a/vendor/github.com/nsf/termbox-go/syscalls_darwin.go
+++ b/pkg/termbox/syscalls_darwin.go
diff --git a/vendor/github.com/nsf/termbox-go/syscalls_darwin_amd64.go b/pkg/termbox/syscalls_darwin_amd64.go
index 11f25be..11f25be 100644
--- a/vendor/github.com/nsf/termbox-go/syscalls_darwin_amd64.go
+++ b/pkg/termbox/syscalls_darwin_amd64.go
diff --git a/vendor/github.com/nsf/termbox-go/syscalls_dragonfly.go b/pkg/termbox/syscalls_dragonfly.go
index e03624e..e03624e 100644
--- a/vendor/github.com/nsf/termbox-go/syscalls_dragonfly.go
+++ b/pkg/termbox/syscalls_dragonfly.go
diff --git a/vendor/github.com/nsf/termbox-go/syscalls_freebsd.go b/pkg/termbox/syscalls_freebsd.go
index e03624e..e03624e 100644
--- a/vendor/github.com/nsf/termbox-go/syscalls_freebsd.go
+++ b/pkg/termbox/syscalls_freebsd.go
diff --git a/vendor/github.com/nsf/termbox-go/syscalls_linux.go b/pkg/termbox/syscalls_linux.go
index b88960d..b88960d 100644
--- a/vendor/github.com/nsf/termbox-go/syscalls_linux.go
+++ b/pkg/termbox/syscalls_linux.go
diff --git a/vendor/github.com/nsf/termbox-go/syscalls_netbsd.go b/pkg/termbox/syscalls_netbsd.go
index 49a3355..49a3355 100644
--- a/vendor/github.com/nsf/termbox-go/syscalls_netbsd.go
+++ b/pkg/termbox/syscalls_netbsd.go
diff --git a/vendor/github.com/nsf/termbox-go/syscalls_openbsd.go b/pkg/termbox/syscalls_openbsd.go
index 49a3355..49a3355 100644
--- a/vendor/github.com/nsf/termbox-go/syscalls_openbsd.go
+++ b/pkg/termbox/syscalls_openbsd.go
diff --git a/vendor/github.com/nsf/termbox-go/syscalls_windows.go b/pkg/termbox/syscalls_windows.go
index 472d002..472d002 100644
--- a/vendor/github.com/nsf/termbox-go/syscalls_windows.go
+++ b/pkg/termbox/syscalls_windows.go
diff --git a/vendor/github.com/nsf/termbox-go/termbox.go b/pkg/termbox/termbox.go
index fbe4c3d..fbe4c3d 100644
--- a/vendor/github.com/nsf/termbox-go/termbox.go
+++ b/pkg/termbox/termbox.go
diff --git a/vendor/github.com/nsf/termbox-go/termbox_common.go b/pkg/termbox/termbox_common.go
index c3355cc..c3355cc 100644
--- a/vendor/github.com/nsf/termbox-go/termbox_common.go
+++ b/pkg/termbox/termbox_common.go
diff --git a/vendor/github.com/nsf/termbox-go/termbox_windows.go b/pkg/termbox/termbox_windows.go
index 7752a17..7752a17 100644
--- a/vendor/github.com/nsf/termbox-go/termbox_windows.go
+++ b/pkg/termbox/termbox_windows.go
diff --git a/vendor/github.com/nsf/termbox-go/terminfo.go b/pkg/termbox/terminfo.go
index 5d38fce..5d38fce 100644
--- a/vendor/github.com/nsf/termbox-go/terminfo.go
+++ b/pkg/termbox/terminfo.go
diff --git a/vendor/github.com/nsf/termbox-go/terminfo_builtin.go b/pkg/termbox/terminfo_builtin.go
index a948660..a948660 100644
--- a/vendor/github.com/nsf/termbox-go/terminfo_builtin.go
+++ b/pkg/termbox/terminfo_builtin.go