mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-03 02:00:43 +00:00
- All HostMetadata information becomes NodeMetadata
- Significant change to mechanics, but same net effect
- LocalNets becomes "local_networks", space-separated list of CIDRs
- Load becomes simple single string
- Use MakeHostNodeID for indexing into Host topology
- (That changes the app /origin/{id} handler; will be removed later)
22 lines
447 B
Go
22 lines
447 B
Go
package report_test
|
|
|
|
import (
|
|
"github.com/davecgh/go-spew/spew"
|
|
"github.com/pmezard/go-difflib/difflib"
|
|
)
|
|
|
|
func init() {
|
|
spew.Config.SortKeys = true // :\
|
|
}
|
|
|
|
func diff(want, have interface{}) string {
|
|
text, _ := difflib.GetUnifiedDiffString(difflib.UnifiedDiff{
|
|
A: difflib.SplitLines(spew.Sdump(want)),
|
|
B: difflib.SplitLines(spew.Sdump(have)),
|
|
FromFile: "want",
|
|
ToFile: "have",
|
|
Context: 5,
|
|
})
|
|
return "\n" + text
|
|
}
|