Last active
August 29, 2015 14:09
-
-
Save twotwotwo/68f8d133c665a07e2b67 to your computer and use it in GitHub Desktop.
'net' with deepest occurrence of each pkg only
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If you take the full `net` tree, for each package find the deepest | |
level of tree where it appears, and delete other imports of that | |
package that are nearer the root, you get something like: | |
net | |
os | |
io | |
errors | |
time | |
syscall | |
sync | |
runtime | |
sync/atomic | |
math/rand | |
math | |
sort | |
Yay: preserves the depth, still a tree so no tangle of arrows. | |
Boo: hides most of the relationships, like net imports sync. | |
If same pkg's imported twice at same depth, you're stuck picking arbitrarily | |
which import to show. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment