First actual commit

This commit is contained in:
2024-05-02 21:19:44 +01:00
commit a5e08510f0
56 changed files with 19282 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
package device
import (
"os"
)
type PrinterUSB struct {
Path string
}
func (p *PrinterUSB) Write(data []byte) (int, error) {
printer, err := os.OpenFile(p.Path, os.O_WRONLY, 0666)
if err != nil {
panic(err)
}
defer printer.Close()
return printer.Write(data)
}