commit 4c7d35da1715a70213f482293dd5064fa67daf99 Author: 白茶清欢 Date: Sat Apr 15 20:20:42 2023 +0800 泛型定义 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6e0b823 --- /dev/null +++ b/.gitignore @@ -0,0 +1,21 @@ +# Created by .ignore support plugin (hsz.mobi) +### Go template +# Binaries for programs and plugins +*.exe +*.exe~ +*.dll +*.so +*.dylib + +# Test binary, built with `go test -c` +*.test + +# Output of the go coverage tool, specifically when used with LiteIDE +*.out + +# Dependency directories (remove the comment below to include it) +# vendor/ +.idea +.vscode +release +logs diff --git a/dict.go b/dict.go new file mode 100644 index 0000000..24ab5a6 --- /dev/null +++ b/dict.go @@ -0,0 +1,17 @@ +// Package op_type ... +// +// Description : op_type ... +// +// Author : go_developer@163.com<白茶清欢> +// +// Date : 2023-04-15 20:17 +package op_type + +// Dict ... +// +// Author : go_developer@163.com<白茶清欢> +// +// Date : 20:18 2023/4/15 +type Dict interface { + map[string]interface{} | map[interface{}]interface{} | map[int64]int64 | map[float64]interface{} +} diff --git a/float.go b/float.go new file mode 100644 index 0000000..945da36 --- /dev/null +++ b/float.go @@ -0,0 +1,17 @@ +// Package op_type ... +// +// Description : op_type ... +// +// Author : go_developer@163.com<白茶清欢> +// +// Date : 2023-04-15 20:12 +package op_type + +// Float ... +// +// Author : go_developer@163.com<白茶清欢> +// +// Date : 20:12 2023/4/15 +type Float interface { + float32 | float64 +} diff --git a/int.go b/int.go new file mode 100644 index 0000000..f0065b2 --- /dev/null +++ b/int.go @@ -0,0 +1,17 @@ +// Package op_type ... +// +// Description : op_type ... +// +// Author : go_developer@163.com<白茶清欢> +// +// Date : 2023-04-15 20:07 +package op_type + +// Int int类型 +// +// Author : go_developer@163.com<白茶清欢> +// +// Date : 20:07 2023/4/15 +type Int interface { + int | int8 | int16 | int32 | int64 +} diff --git a/number.go b/number.go new file mode 100644 index 0000000..6ffa711 --- /dev/null +++ b/number.go @@ -0,0 +1,17 @@ +// Package op_type ... +// +// Description : op_type ... +// +// Author : go_developer@163.com<白茶清欢> +// +// Date : 2023-04-15 20:13 +package op_type + +// Number ... +// +// Author : go_developer@163.com<白茶清欢> +// +// Date : 20:14 2023/4/15 +type Number interface { + int | int8 | int16 | int32 | int64 | uint | uint8 | uint16 | uint32 | uint64 | float32 | float64 +} diff --git a/uint.go b/uint.go new file mode 100644 index 0000000..79724f3 --- /dev/null +++ b/uint.go @@ -0,0 +1,17 @@ +// Package op_type ... +// +// Description : op_type ... +// +// Author : go_developer@163.com<白茶清欢> +// +// Date : 2023-04-15 20:10 +package op_type + +// Uint ... +// +// Author : go_developer@163.com<白茶清欢> +// +// Date : 20:10 2023/4/15 +type Uint interface { + uint | uint8 | uint16 | uint32 | uint64 +}