/** * @Author: jager * @Email: lhj168os@gmail.com * @File: consts_test * @Date: 2022/1/6 2:36 下午 * @package: consts * @Version: v1.0.0 * * @Description: * */ package apity import ( "fmt" "testing" ) func TestApiType(t *testing.T) { var opened int64 = 7 opened = opened & int64(Obscenity) //opened = opened | int64(Obscenity) //opened = opened | int64(Weather) fmt.Printf("opened = %b\n", opened) //fmt.Printf("soup type = %d\n", int64(Soup)&opened) //fmt.Printf("weather type = %b\n", Weather) //fmt.Printf("obscenity type = %b\n", Obscenity) }