From 921f78670d7e514f117b42905e7487f95f88cc28 Mon Sep 17 00:00:00 2001 From: Sean Hinchee Date: Wed, 26 Jul 2017 18:38:30 +0000 Subject: [PATCH] forget to test build, fixed --- config.go | 2 +- helper.go | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/config.go b/config.go index 02842cd747ecb75261e7247a01c7be53fd21760e..ce1604b1e5e2acaa67f3b000beeac0c43a2e6931 100644 --- a/config.go +++ b/config.go @@ -79,7 +79,7 @@ func CreateConfig() { if plan9 { password = GetPass() - err = Rawoff() + err = RawOff() if err != nil { fmt.Println("Failed to set rawoff") } diff --git a/helper.go b/helper.go index d641864b50c644bf8bf9b4cd936092f50f5dab5c..f0c2e859a36cd72163bccf9e5e46710f6601bfd1 100644 --- a/helper.go +++ b/helper.go @@ -2,11 +2,13 @@ package main import ( "log" + "os" "os/exec" "strings" "time" "fmt" "bitbucket.org/henesy/disco/DiscordGo" + "bufio" ) //HexColor is a struct gives RGB values @@ -95,7 +97,7 @@ func dis(a, b int) float64 { return float64((a - b) * (a - b)) } -func Rawon() { +func Rawon() error { consctl, err := os.OpenFile("/dev/consctl", os.O_WRONLY, 0200) if err != nil { /* not on Plan 9 */ @@ -112,7 +114,7 @@ func Rawon() { return nil } -func RawOff() { +func RawOff() error { consctl, err := os.OpenFile("/dev/consctl", os.O_WRONLY, 0200) if err != nil { /* not on Plan 9 */ @@ -128,7 +130,7 @@ func RawOff() { return nil } -func GetPass() { +func GetPass() string { cons, err := os.OpenFile("/dev/cons", os.O_RDWR, 0600) if err != nil { fmt.Println("Failed to open /dev/cons")