Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ksidirop/NTOP 0053 support raw bytes flag #4

Merged
merged 2 commits into from
Feb 8, 2022

Conversation

dsidirop
Copy link
Owner

@dsidirop dsidirop commented Feb 8, 2022

  • chore (.gitignore): ignore .vscode folder and any *.code-workspace files
  • feat (new cli flag): add new flag '-b' to print traffic in raw bytes

  - consolidate 1024-related constants used in Psize() into kibibytes, mebibytes, kibibytes which are well-known, human-readable units of measurement
  - the if-else structure was not really needed and it has been simplified to use plain 'ifs'
  - the "NA" case at the bottom would never be reached because all possible cases are already covered from a numerical perspective
  - neutral cleanups in Psize() to make it more readable
  - refactor the test harness to have it employ t.Run() instead of raw tests
@dsidirop dsidirop merged commit ed12dae into master Feb 8, 2022
@dsidirop dsidirop deleted the ksidirop/NTOP-0053-support-raw-bytes-flag branch February 8, 2022 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants