From 436219157719f6b1e80632feabee8a7bbe3bdeee Mon Sep 17 00:00:00 2001 From: hokamsingh Date: Fri, 30 Aug 2024 23:23:42 +0530 Subject: [PATCH] feat: updated project structure --- .gitignore | 1 + README.md | 2 +- pkg/lessgo/less.go | 4 +++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index ee00559..b93c2f7 100644 --- a/.gitignore +++ b/.gitignore @@ -22,6 +22,7 @@ dist/ app/ cmd/ uploads/ +temp/ # Go modules and cache vendor/ diff --git a/README.md b/README.md index 25765b9..3f60ac8 100644 --- a/README.md +++ b/README.md @@ -110,4 +110,4 @@ For any questions, issues, or feedback, please visit our [GitHub repository](htt Happy coding! ---- +--- \ No newline at end of file diff --git a/pkg/lessgo/less.go b/pkg/lessgo/less.go index fdc982d..e3a2427 100644 --- a/pkg/lessgo/less.go +++ b/pkg/lessgo/less.go @@ -377,7 +377,9 @@ const ( // ) func ConvertToBytes(size int64, unit SizeUnit) int64 { s, err := utils.ConvertToBytes(float64(size), utils.SizeUnit(unit)) - log.Printf("Failed to convert bytes: %v", err) + if err != nil { + log.Fatalf("Failed to convert bytes: %v", err) + } return int64(s) }