mirror of
https://github.com/vbatts/go-mtree.git
synced 2024-11-22 00:15:39 +00:00
*.go: clean up variable names
This commit is contained in:
parent
2f374a383e
commit
03270d3d9e
2 changed files with 19 additions and 14 deletions
14
compare.go
14
compare.go
|
@ -350,16 +350,17 @@ func Compare(oldDh, newDh *DirectoryHierarchy, keys []Keyword) ([]InodeDelta, er
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
//fmt.Printf("new: %q\n", path)
|
||||
|
||||
// Cannot take &kv because it's the iterator.
|
||||
copy := new(Entry)
|
||||
*copy = e
|
||||
cEntry := new(Entry)
|
||||
*cEntry = e
|
||||
|
||||
_, ok := diffs[path]
|
||||
if !ok {
|
||||
diffs[path] = &stateT{}
|
||||
}
|
||||
diffs[path].Old = copy
|
||||
diffs[path].Old = cEntry
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -372,16 +373,17 @@ func Compare(oldDh, newDh *DirectoryHierarchy, keys []Keyword) ([]InodeDelta, er
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
//fmt.Printf("old: %q\n", path)
|
||||
|
||||
// Cannot take &kv because it's the iterator.
|
||||
copy := new(Entry)
|
||||
*copy = e
|
||||
cEntry := new(Entry)
|
||||
*cEntry = e
|
||||
|
||||
_, ok := diffs[path]
|
||||
if !ok {
|
||||
diffs[path] = &stateT{}
|
||||
}
|
||||
diffs[path].New = copy
|
||||
diffs[path].New = cEntry
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,8 @@ import (
|
|||
"io/ioutil"
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -54,14 +56,15 @@ func TestParser(t *testing.T) {
|
|||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
/*
|
||||
|
||||
if i == 1 {
|
||||
buf, err := xml.MarshalIndent(dh, "", " ")
|
||||
if err == nil {
|
||||
t.Error(string(buf))
|
||||
spew.Dump(dh)
|
||||
//buf, err := xml.MarshalIndent(dh, "", " ")
|
||||
//if err == nil {
|
||||
//t.Error(string(buf))
|
||||
//}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
gotNums := countTypes(dh)
|
||||
for typ, num := range tf.Counts {
|
||||
if gNum, ok := gotNums[typ]; ok {
|
||||
|
|
Loading…
Reference in a new issue