package bhomedbapi import ( jsoniter "github.com/json-iterator/go" ) type SysRoleApi struct { } func (api SysRoleApi) FindAll() (bool, interface{}) { url := DATA_URL_PREFIX + "/role/findAll" netNode := getNetNode(url2Topic(Topic_System_Service, url)) client := NewClient(WithNodes(netNode)) body, err := client.DoGetRequest(url, nil, nil) if err != nil { return false, nil } var json = jsoniter.ConfigCompatibleWithStandardLibrary var res Result if err = json.Unmarshal(body, &res); err != nil { return false, nil } return true, res.Data }