Просмотр исходного кода

store: removed duplicate method call for the same method

the get func was calling path's Join and clean method which is already
being in internalGet(nodePath) func. Hence the func was getting called
unnecessarily twice which is not needed.

#6295
sharat 9 лет назад
Родитель
Сommit
754b9025c4
1 измененных файлов с 0 добавлено и 2 удалено
  1. 0 2
      store/store.go

+ 0 - 2
store/store.go

@@ -141,8 +141,6 @@ func (s *store) Get(nodePath string, recursive, sorted bool) (*Event, error) {
 		}
 		}
 	}()
 	}()
 
 
-	nodePath = path.Clean(path.Join("/", nodePath))
-
 	n, err := s.internalGet(nodePath)
 	n, err := s.internalGet(nodePath)
 	if err != nil {
 	if err != nil {
 		return nil, err
 		return nil, err