mirror of
https://github.com/foomo/contentserver.git
synced 2025-10-16 12:25:44 +00:00
grouped variable declarations
This commit is contained in:
parent
7f9b32162e
commit
9d94c09735
@ -38,10 +38,12 @@ func (repo *Repo) updateDimension(dimension string, node *content.RepoNode) erro
|
||||
// do not call directly, but only through channel
|
||||
func (repo *Repo) _updateDimension(dimension string, newNode *content.RepoNode) error {
|
||||
newNode.WireParents()
|
||||
newDirectory := make(map[string]*content.RepoNode)
|
||||
newURIDirectory := make(map[string]*content.RepoNode)
|
||||
|
||||
err := builDirectory(newNode, newDirectory, newURIDirectory)
|
||||
var (
|
||||
newDirectory = make(map[string]*content.RepoNode)
|
||||
newURIDirectory = make(map[string]*content.RepoNode)
|
||||
err = builDirectory(newNode, newDirectory, newURIDirectory)
|
||||
)
|
||||
if err != nil {
|
||||
return errors.New("update dimension \"" + dimension + "\" failed when building its directory:: " + err.Error())
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user