feat(api): initializes the endpoint with an empty slice instead of a pointer

pull/534/head
Anthony Lapenna 2017-01-23 16:29:49 +13:00
parent 8cf6d34362
commit 980f65a08a
1 changed files with 1 additions and 1 deletions

View File

@ -44,7 +44,7 @@ func (service *EndpointService) Endpoint(ID portainer.EndpointID) (*portainer.En
// Endpoints return an array containing all the endpoints.
func (service *EndpointService) Endpoints() ([]portainer.Endpoint, error) {
var endpoints []portainer.Endpoint
var endpoints = make([]portainer.Endpoint, 0)
err := service.store.db.View(func(tx *bolt.Tx) error {
bucket := tx.Bucket([]byte(endpointBucketName))