Merge branch 'master' into re-architect-widgets
This commit is contained in:
commit
2616308baa
@ -1,8 +1,6 @@
|
||||
package exhibit
|
||||
|
||||
import (
|
||||
"golang.org/x/sys/unix"
|
||||
|
||||
"bytes"
|
||||
"fmt"
|
||||
"image"
|
||||
@ -11,6 +9,8 @@ import (
|
||||
"os"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -67,7 +67,7 @@ func Init() *Terminal {
|
||||
log.Panic(err)
|
||||
}
|
||||
|
||||
termios, err := unix.IoctlGetTermios(int(out.Fd()), unix.TCGETS)
|
||||
termios, err := unix.IoctlGetTermios(int(out.Fd()), ioctlReadTermios)
|
||||
if err != nil {
|
||||
out.Close()
|
||||
in.Close()
|
||||
@ -367,7 +367,7 @@ func (t *Terminal) enterRaw() {
|
||||
termios.Cc[unix.VMIN] = 1
|
||||
termios.Cc[unix.VTIME] = 0
|
||||
|
||||
err := unix.IoctlSetTermios(t.outFd(), unix.TCSETS, &termios)
|
||||
err := unix.IoctlSetTermios(t.outFd(), ioctlWriteTermios, &termios)
|
||||
if err != nil {
|
||||
t.exitAlt()
|
||||
t.out.Close()
|
||||
@ -377,7 +377,7 @@ func (t *Terminal) enterRaw() {
|
||||
}
|
||||
|
||||
func (t *Terminal) exitRaw() {
|
||||
err := unix.IoctlSetTermios(t.outFd(), unix.TCSETS, &t.termios)
|
||||
err := unix.IoctlSetTermios(t.outFd(), ioctlWriteTermios, &t.termios)
|
||||
if err != nil {
|
||||
t.out.Close()
|
||||
t.in.Close()
|
||||
|
10
exhibit/termios_bsd.go
Normal file
10
exhibit/termios_bsd.go
Normal file
@ -0,0 +1,10 @@
|
||||
// +build darwin freebsd netbsd openbsd
|
||||
|
||||
package exhibit
|
||||
|
||||
import (
|
||||
"syscall"
|
||||
)
|
||||
|
||||
const ioctlReadTermios = syscall.TIOCGETA
|
||||
const ioctlWriteTermios = syscall.TIOCSETA
|
10
exhibit/termios_linux.go
Normal file
10
exhibit/termios_linux.go
Normal file
@ -0,0 +1,10 @@
|
||||
// +build linux
|
||||
|
||||
package exhibit
|
||||
|
||||
import (
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
const ioctlReadTermios = unix.TCGETS
|
||||
const ioctlWriteTermios = unix.TCSETS
|
10
go.mod
Normal file
10
go.mod
Normal file
@ -0,0 +1,10 @@
|
||||
module git.cotugno.family/kevin/spectator
|
||||
|
||||
go 1.15
|
||||
|
||||
require (
|
||||
github.com/emirpasic/gods v1.12.0
|
||||
github.com/gorilla/websocket v1.4.2
|
||||
github.com/shopspring/decimal v1.2.0
|
||||
golang.org/x/sys v0.0.0-20200928205150-006507a75852
|
||||
)
|
8
go.sum
Normal file
8
go.sum
Normal file
@ -0,0 +1,8 @@
|
||||
github.com/emirpasic/gods v1.12.0 h1:QAUIPSaCu4G+POclxeqb3F+WPpdKqFGlw36+yOzGlrg=
|
||||
github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o=
|
||||
github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc=
|
||||
github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
||||
github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ=
|
||||
github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
|
||||
golang.org/x/sys v0.0.0-20200928205150-006507a75852 h1:sXxgOAXy8JwHhZnPuItAlUtwIlxrlEqi28mKhUR+zZY=
|
||||
golang.org/x/sys v0.0.0-20200928205150-006507a75852/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
@ -1,7 +1,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"git.kevincotugno.com/kcotugno/spectator/exhibit"
|
||||
"git.cotugno.family/kevin/spectator/exhibit"
|
||||
)
|
||||
|
||||
type ListEntry struct {
|
||||
|
@ -1,7 +1,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"git.kevincotugno.com/kcotugno/spectator/exhibit"
|
||||
"git.cotugno.family/kevin/spectator/exhibit"
|
||||
"github.com/shopspring/decimal"
|
||||
|
||||
"image"
|
||||
|
Reference in New Issue
Block a user