You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recommend setting a global variable pointing to the endianness (encoding.BigEndian, encoding.LittleEndian) over conditional switching between either variant using a global variable, to make the code simpler.
Best practice would be to not use globals at all. This helps with using golangs test framework in parallel and makes your code much cleaner. In addition to that, to figure out possible performance bottlenecks, you can use Benchmark* functions in your *_test.go files.
The text was updated successfully, but these errors were encountered:
I recommend setting a global variable pointing to the endianness (encoding.BigEndian, encoding.LittleEndian) over conditional switching between either variant using a global variable, to make the code simpler.
Best practice would be to not use globals at all. This helps with using golangs test framework in parallel and makes your code much cleaner. In addition to that, to figure out possible performance bottlenecks, you can use
Benchmark*
functions in your*_test.go
files.The text was updated successfully, but these errors were encountered: