code: func (s *Store) CreateCollection(name string, compare gtreap.Compare) *Collection {
  	s.assertNotReadOnly()
  
  	s.collLock.Lock()
  	defer s.collLock.Unlock()
  
  	// Try to get the existing Collection again now that we hold the write lock.
  	if _, ok := s.colls[name]; ok {
  		panic(fmt.Errorf("collection %q already exists", name))
  	}
  
  	// Create a new read/write Collection.
  	coll := &Collection{
  		name:     name,
  		rootLock: &sync.RWMutex{},
  	}
  	coll.setRoot(gtreap.NewTreap(compare))
  
  	if s.colls == nil {
  		s.colls = make(map[string]*Collection)
  	}
  	s.colls[name] = coll
  	s.collNames = s.insertCollectionName(name)
  	return coll
  }
docs: // CreateCollection returns a Collection with the specified name. If the
  // collection already exists, or if s is read-only, CreateCollection will panic.