aboutsummaryrefslogtreecommitdiff
path: root/lp.go
diff options
context:
space:
mode:
Diffstat (limited to 'lp.go')
-rw-r--r--lp.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/lp.go b/lp.go
index da0dfd0..2a36f07 100644
--- a/lp.go
+++ b/lp.go
@@ -5,20 +5,20 @@ import (
"os"
)
-type LPDevice struct {
+type LP struct {
*os.File
}
-func NewLPDevice(path string) (Devicer, error) {
+func NewLP(path string) (Devicer, error) {
f, err := os.OpenFile(path, os.O_RDWR, 0666)
- return LPDevice{f}, err
+ return LP{f}, err
}
-func (d LPDevice) Close() {
+func (d LP) Close() {
d.File.Close()
}
-func (d LPDevice) Handle() *bufio.ReadWriter {
+func (d LP) Handle() *bufio.ReadWriter {
r := bufio.NewReader(d.File)
w := bufio.NewWriter(d.File)
return bufio.NewReadWriter(r, w)