From 0d794ada3be092678430077991b323472214e44c Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Fri, 15 May 2015 17:44:18 +0200 Subject: Refactor Device --- device.go | 2 +- lp.go | 2 +- main.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/device.go b/device.go index ea8c416..eff1333 100644 --- a/device.go +++ b/device.go @@ -2,7 +2,7 @@ package main import "bufio" -type Devicer interface { +type Device interface { Close() Handle() *bufio.ReadWriter } diff --git a/lp.go b/lp.go index 2a36f07..e4ab27c 100644 --- a/lp.go +++ b/lp.go @@ -9,7 +9,7 @@ type LP struct { *os.File } -func NewLP(path string) (Devicer, error) { +func NewLP(path string) (LP, error) { f, err := os.OpenFile(path, os.O_RDWR, 0666) return LP{f}, err } diff --git a/main.go b/main.go index 16aa8f7..f2c671c 100644 --- a/main.go +++ b/main.go @@ -7,7 +7,7 @@ import ( ) var ( - dev Devicer + dev Device err error cmd = flag.String("cmd", "", "command") ) -- cgit v1.2.3