21 lines
458 B
Go
21 lines
458 B
Go
// Package util ...
|
|
//
|
|
// Description : util ...
|
|
//
|
|
// Author : go_developer@163.com<白茶清欢>
|
|
//
|
|
// Date : 2023-03-30 14:43
|
|
package util
|
|
|
|
import (
|
|
"fmt"
|
|
"testing"
|
|
)
|
|
|
|
func Test_array_In(t *testing.T) {
|
|
fmt.Println(Array.In(1234, []string{"1234", "123", "1"}))
|
|
fmt.Println(Array.In(1234, []interface{}{1234, "123", "1"}))
|
|
fmt.Println(Array.In(nil, []interface{}{1234, "123", "1"}))
|
|
fmt.Println(Array.In(nil, []interface{}{1234, "123", "1", nil}))
|
|
}
|