mirror of
https://github.com/p4gefau1t/trojan-go.git
synced 2024-04-21 12:21:34 +00:00
Fix according to go vet result
This commit is contained in:
@@ -42,7 +42,7 @@ func (o *apiController) listUsers(apiClient service.TrojanServerServiceClient) e
|
||||
return err
|
||||
}
|
||||
defer stream.CloseSend()
|
||||
result := []service.ListUsersResponse{}
|
||||
result := []*service.ListUsersResponse{}
|
||||
for {
|
||||
resp, err := stream.Recv()
|
||||
if err != nil {
|
||||
@@ -51,7 +51,7 @@ func (o *apiController) listUsers(apiClient service.TrojanServerServiceClient) e
|
||||
}
|
||||
return err
|
||||
}
|
||||
result = append(result, *resp)
|
||||
result = append(result, resp)
|
||||
}
|
||||
data, err := json.Marshal(result)
|
||||
common.Must(err)
|
||||
|
||||
Reference in New Issue
Block a user