Skip to content

Commit

Permalink
Merge pull request #415 from projectdiscovery/feat-units
Browse files Browse the repository at this point in the history
Adding common size units
  • Loading branch information
Mzack9999 authored May 15, 2024
2 parents ce08021 + 7f9ef82 commit dda5064
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions unit/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// unit contains common values:
// - units size (ex. byte, kilo, mega, giga)
package unit
8 changes: 8 additions & 0 deletions unit/size.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package unit

const (
Byte = 1
Kilo = 1024
Mega = 1024 * 1024
Giga = 1024 * 1024 * 1024
)

0 comments on commit dda5064

Please sign in to comment.