If this is module/library/framework, then you shouldn't log inside the functions, but return errors with additional info.
If some part of code should run, and fail if error occurs, name function according to the scheme MustDoSomethin() and then panic on error. Note that in doc comment.
TODO:
As listed in the TODO list above, some of the parts of code are inconsistent.
go vet
,go fmt
andgo imports
.MustDoSomethin()
and thenpanic
on error. Note that in doc comment.