泛型定义
This commit is contained in:
commit
4c7d35da17
21
.gitignore
vendored
Normal file
21
.gitignore
vendored
Normal file
@ -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
|
17
dict.go
Normal file
17
dict.go
Normal file
@ -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{}
|
||||
}
|
17
float.go
Normal file
17
float.go
Normal file
@ -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
|
||||
}
|
17
int.go
Normal file
17
int.go
Normal file
@ -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
|
||||
}
|
17
number.go
Normal file
17
number.go
Normal file
@ -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
|
||||
}
|
17
uint.go
Normal file
17
uint.go
Normal file
@ -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
|
||||
}
|
Loading…
Reference in New Issue
Block a user