(Feat): Initial Commit
Some checks failed
Build & Test / build-test (push) Has been cancelled
Build & Test / swagger-codegen-cli (push) Has been cancelled
CodeQL / Analyze (go) (push) Has been cancelled

This commit is contained in:
2026-07-03 19:41:31 +05:30
commit 7e940c83a7
461 changed files with 45002 additions and 0 deletions

32
internal/util/int.go Normal file
View File

@@ -0,0 +1,32 @@
// nolint:revive
package util
import (
"math"
"github.com/go-openapi/swag"
)
func IntPtrToInt64Ptr(num *int) *int64 {
if num == nil {
return nil
}
return swag.Int64(int64(*num))
}
func Int64PtrToIntPtr(num *int64) *int {
if num == nil {
return nil
}
return swag.Int(int(*num))
}
func IntToInt32Ptr(num int) *int32 {
if num > math.MaxInt32 || num < math.MinInt32 {
return nil
}
return swag.Int32(int32(num))
}