diff options
author | 2022-02-12 18:27:58 +0000 | |
---|---|---|
committer | 2022-02-12 18:27:58 +0000 | |
commit | 31935ee206107f077878d3cdb6a26b82436b6893 (patch) | |
tree | 2d522bf98013dc5a4539133561b645fd7457eb06 /vendor/codeberg.org/gruf/go-format/util.go | |
parent | [chore] Add nightly mirror to Codeberg.org (#392) (diff) | |
parent | Go mod tidy (diff) | |
download | gotosocial-31935ee206107f077878d3cdb6a26b82436b6893.tar.xz |
Merge pull request #361 from superseriousbusiness/media_refactorv0.2.0
Refactor media handler to allow async media resolution
Diffstat (limited to 'vendor/codeberg.org/gruf/go-format/util.go')
-rw-r--r-- | vendor/codeberg.org/gruf/go-format/util.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/vendor/codeberg.org/gruf/go-format/util.go b/vendor/codeberg.org/gruf/go-format/util.go new file mode 100644 index 000000000..68a9e2de3 --- /dev/null +++ b/vendor/codeberg.org/gruf/go-format/util.go @@ -0,0 +1,13 @@ +package format + +import "strconv" + +// can32bitInt returns whether it's possible for 's' to contain an int on 32bit platforms. +func can32bitInt(s string) bool { + return strconv.IntSize == 32 && (0 < len(s) && len(s) < 10) +} + +// can64bitInt returns whether it's possible for 's' to contain an int on 64bit platforms. +func can64bitInt(s string) bool { + return strconv.IntSize == 64 && (0 < len(s) && len(s) < 19) +} |