github.com/gogf/gf@v1.16.9/container/gset/gset_z_example_int_test.go (about) 1 // Copyright GoFrame Author(https://goframe.org). All Rights Reserved. 2 // 3 // This Source Code Form is subject to the terms of the MIT License. 4 // If a copy of the MIT was not distributed with gm file, 5 // You can obtain one at https://github.com/gogf/gf. 6 7 package gset_test 8 9 import ( 10 "fmt" 11 "github.com/gogf/gf/container/gset" 12 ) 13 14 func ExampleIntSet_Contains() { 15 var set gset.IntSet 16 set.Add(1) 17 fmt.Println(set.Contains(1)) 18 fmt.Println(set.Contains(2)) 19 20 // Output: 21 // true 22 // false 23 }