Skip to content

Commit

Permalink
address breaking changes from xlab/treeprint
Browse files Browse the repository at this point in the history
A PR of xlab/treeprint (xlab/treeprint#6)
which was merged might break gops in the future.
The PR removed treeprint.EdgeTypeStart. To set the root node,
we can now use SetValue(value Value) instead.

In this commit,

    dep ensure -update github.com/xlab/treeprint

was executed to update the library and then fix is applied.
  • Loading branch information
shihanng committed Jul 11, 2018
1 parent 62b4d22 commit 7c15520
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func displayProcessTree() {
pstree[p.PPID] = append(pstree[p.PPID], p)
}
tree := treeprint.New()
treeprint.EdgeTypeStart = "..."
tree.SetValue("...")
seen := map[int]bool{}
for _, p := range ps {
constructProcessTree(p.PPID, p, seen, tree)
Expand Down
12 changes: 6 additions & 6 deletions vendor/github.com/xlab/treeprint/struct.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 16 additions & 3 deletions vendor/github.com/xlab/treeprint/treeprint.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions vendor/github.com/xlab/treeprint/treeprint_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7c15520

Please sign in to comment.