redcode-labs / Coldfire

Golang malware development library
MIT License
927 stars 142 forks source link

Code improvements #10

Closed shanduur closed 11 months ago

shanduur commented 3 years ago

TODO:

As listed in the TODO list above, some of the parts of code are inconsistent.

  1. You should consider using tools like go vet, go fmt and go imports.
  2. Unexported methods should be used.
  3. Exported methods should contain doc comment.
  4. If this is module/library/framework, then you shouldn't log inside the functions, but return errors with additional info.
  5. 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.
wintrmvte commented 11 months ago

Everything done except error propagation - errors are handled by Check() because panic() is not informative enough