joshmedeski / sesh

Smart session manager for the terminal
MIT License
417 stars 17 forks source link

refactor: error handling in connect.Connect #44

Closed markfeinstein closed 5 months ago

markfeinstein commented 5 months ago

Restructure the code around the connect.Connect method to return errors up the stack for centralized handling.

fixes: #31

markfeinstein commented 5 months ago

@joshmedeski We can reduce the error handling here as much as you'd like, but fwiw Go's error handling tends to look rather repetative and rather verbose. While it is possible to use a panic to terminate a running process and return an error that is typically discouraged in favor of handling errors where they happen / where they are returned.