diff options
author | Blaster4385 <venkatesh@tablaster.dev> | 2025-01-13 19:34:33 +0530 |
---|---|---|
committer | Blaster4385 <venkatesh@tablaster.dev> | 2025-01-13 19:36:21 +0530 |
commit | a8e48c9cf4694a13113bb14a2849a8347a717b27 (patch) | |
tree | 9f0a2144ef1c660e03687eeb02acd8f0fa6d1cb3 /app.go | |
parent | ccaf20fb5b748eafae6b286ba9173c0a4f0ffb27 (diff) |
refactor(main|app.go): simplified logging
Diffstat (limited to 'app.go')
-rw-r--r-- | app.go | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -166,12 +166,11 @@ func (a *App) sendCommand(data []byte) error { return fmt.Errorf("failed to get output endpoint: %v", err) } - written, err := outEndpoint.Write(data) - if err == nil { - fmt.Printf("Success on endpoint 0x%02x! Sent %d bytes\n", endpoint, written) - return nil + _, err = outEndpoint.Write(data) + if err != nil { + return fmt.Errorf("failed to send on any endpoint") } - return fmt.Errorf("failed to send on any endpoint") + return nil } func (a *App) ExportGrid(filename string, grid [][]bool) error { |