In a lot of places, possible errors will just be given to the Check function, which logs the error and happily continues on. This can result in runtime errors. Some instances are:
Here it is just assumed that opening the database connection will be successful. It will log an error, should one happen, but it will blindly run into the call at line 92.
Same thing on
and the following lines.
I think those errors could be handled more gracefully.
In addition, I'd recommend renaming the Check function into something like LogError. This way, it is obvious what the function actually does.
In a lot of places, possible errors will just be given to the Check function, which logs the error and happily continues on. This can result in runtime errors. Some instances are:
Pastebin/pastebin.go
Line 89 in 8f7528c
Here it is just assumed that opening the database connection will be successful. It will log an error, should one happen, but it will blindly run into the call at line 92.
Same thing on
Pastebin/pastebin.go
Line 182 in 8f7528c
I think those errors could be handled more gracefully.
In addition, I'd recommend renaming the Check function into something like LogError. This way, it is obvious what the function actually does.