Commit d93a2fb4 by zhengqiuyun86

数组包含封装

parent aff676f1
...@@ -2,6 +2,7 @@ package sqlOp ...@@ -2,6 +2,7 @@ package sqlOp
const Equal = "=" const Equal = "="
const Like = "like" const Like = "like"
const IN = "in"
const LessThan = "<" const LessThan = "<"
const GreatThan = ">" const GreatThan = ">"
const LessThanOrEqual = "<=" const LessThanOrEqual = "<="
......
...@@ -8,8 +8,8 @@ import ( ...@@ -8,8 +8,8 @@ import (
func TestArrayContainsInterface(t *testing.T) { func TestArrayContainsInterface(t *testing.T) {
var areaIds []time.Time var areaIds []time.Time
areaIds = append(areaIds, PareDateTime("2022-02-09 22:09:12")) //areaIds = append(areaIds, PareDateTime("2022-02-09 22:09:12"))
areaIds = append(areaIds, PareDateTime("2022-03-09 22:09:12")) //areaIds = append(areaIds, PareDateTime("2022-03-09 22:09:12"))
areaIds = append(areaIds, PareDateTime("2022-12-09 22:09:12")) //areaIds = append(areaIds, PareDateTime("2022-12-09 22:09:12"))
fmt.Println(ArrayContainsTime(areaIds, PareDateTime("2022-02-10 22:09:12"))) fmt.Println(ArrayContainsTime(areaIds, PareDateTime("2022-02-10 22:09:12")))
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment