From fbb0a0ef38220a4004c7489ccb8caf697c8fbfe8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=85=89=E6=98=A5?= Date: Thu, 29 Sep 2022 17:25:25 +0800 Subject: [PATCH] - add type --- const.go | 2 +- type.go | 31 +++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 type.go diff --git a/const.go b/const.go index f10df91..56b7cf5 100644 --- a/const.go +++ b/const.go @@ -1,3 +1,3 @@ package dorm -const Version = "1.0.47" +const Version = "1.0.48" diff --git a/type.go b/type.go new file mode 100644 index 0000000..78dc200 --- /dev/null +++ b/type.go @@ -0,0 +1,31 @@ +package dorm + +// String 复制 string 对象,并返回复制体 +func String(s string) string { + return s +} + +// Bool 复制 bool 对象,并返回复制体 +func Bool(b bool) bool { + return b +} + +// Float64 复制 float64 对象,并返回复制体 +func Float64(f float64) float64 { + return f +} + +// Float32 复制 float32 对象,并返回复制体 +func Float32(f float32) float32 { + return f +} + +// Int64 复制 int64 对象,并返回复制体 +func Int64(i int64) int64 { + return i +} + +// Int32 复制 int64 对象,并返回复制体 +func Int32(i int32) int32 { + return i +}