From ea758175685d7cccaab382f3d54f087347a1e7cd Mon Sep 17 00:00:00 2001 From: nbuchanan Date: Fri, 9 Jun 2017 15:35:35 -0600 Subject: [PATCH] Fix BucketManager method GetDesignDocuments returning slice of identical pointers Change-Id: I81f45a1f87bdc7849066e8999c1e22ac29e56840 Reviewed-on: http://review.couchbase.org/79643 Reviewed-by: Brett Lawson Tested-by: Brett Lawson --- bucketmgr.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bucketmgr.go b/bucketmgr.go index 1092fcef..e2a99e0e 100644 --- a/bucketmgr.go +++ b/bucketmgr.go @@ -184,8 +184,8 @@ func (bm *BucketManager) GetDesignDocuments() ([]*DesignDocument, error) { } var ddocs []*DesignDocument - for _, ddocData := range ddocsObj.Rows { - ddoc := &ddocData.Doc.Json + for index, ddocData := range ddocsObj.Rows { + ddoc := &ddocsObj.Rows[index].Doc.Json ddoc.Name = ddocData.Doc.Meta.Id[8:] ddocs = append(ddocs, ddoc) }