From 3f95c5506733c3298db7cc20359fb3df5d193d74 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Sun, 15 Mar 2015 01:08:09 -0700 Subject: [PATCH] Skip uinimplemented tests and some cleanup --- mkdocs.yml | 2 ++ pkg/donutbox/donutmem/donutmem.go | 8 ++++---- pkg/donutbox/donutmem/donutmem_test.go | 4 ++-- pkg/storage/encoded/encoded_test.go | 2 +- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/mkdocs.yml b/mkdocs.yml index c0022ef6b..cafd83883 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,4 +1,6 @@ site_name: Minio Documentation +copyright: Minio, Inc. +include_search: true pages: - ['index.md', Welcome to Minio] - ['architecture.md', 'Minio', Architecture] diff --git a/pkg/donutbox/donutmem/donutmem.go b/pkg/donutbox/donutmem/donutmem.go index 2c9c76f7e..24cf5343c 100644 --- a/pkg/donutbox/donutmem/donutmem.go +++ b/pkg/donutbox/donutmem/donutmem.go @@ -41,8 +41,8 @@ func NewDonutMem() donutbox.DonutBox { func (donutMem donutMem) ListBuckets() ([]string, error) { donutMem.lock.RLock() defer donutMem.lock.RUnlock() - buckets := make([]string, 0) - for k, _ := range donutMem.buckets { + var buckets []string + for k := range donutMem.buckets { buckets = append(buckets, k) } return buckets, nil @@ -74,8 +74,8 @@ func (donutMem donutMem) ListObjectsInBucket(bucketKey, prefixKey string) ([]str if curBucket, ok := donutMem.buckets[bucketKey]; ok { curBucket.lock.RLock() defer curBucket.lock.RUnlock() - objects := make([]string, 0) - for objectKey, _ := range curBucket.objects { + var objects []string + for objectKey := range curBucket.objects { if strings.HasPrefix(objectKey, prefixKey) { objects = append(objects, objectKey) } diff --git a/pkg/donutbox/donutmem/donutmem_test.go b/pkg/donutbox/donutmem/donutmem_test.go index e657aca17..2267c10ac 100644 --- a/pkg/donutbox/donutmem/donutmem_test.go +++ b/pkg/donutbox/donutmem/donutmem_test.go @@ -62,7 +62,7 @@ func (s *MySuite) TestBucketList(c *C) { results, err := donut.ListBuckets() c.Assert(len(results), Equals, 0) - buckets := make([]string, 0) + var buckets []string for i := 0; i < 10; i++ { bucket := "foo" + strconv.Itoa(i) buckets = append(buckets, bucket) @@ -83,7 +83,7 @@ func (s *MySuite) TestObjectList(c *C) { results, err := donut.ListObjectsInBucket("foo", "") c.Assert(len(results), Equals, 0) - objects := make([]string, 0) + var objects []string for i := 0; i < 10; i++ { object := "foo" + strconv.Itoa(i) objects = append(objects, object) diff --git a/pkg/storage/encoded/encoded_test.go b/pkg/storage/encoded/encoded_test.go index aaa17ec03..0c2f50ded 100644 --- a/pkg/storage/encoded/encoded_test.go +++ b/pkg/storage/encoded/encoded_test.go @@ -34,7 +34,7 @@ type MySuite struct{} var _ = Suite(&MySuite{}) func (s *MySuite) TestAPISuite(c *C) { - //c.Skip("Not implemented yet.") + c.Skip("Not implemented yet.") var storageList []string create := func() mstorage.Storage { path, err := ioutil.TempDir(os.TempDir(), "minio-fs-")