To stop GC completely, debug.SetGCPercentage needs to receive a negative
integer. Passing a negative integer is cumbersome:
$ gops setgc <pid> -- -1
This commit adds a more user-friendly way to achieve that:
$ gops setgc <pid> off
This behavior is aligned with that of the GOGC env variable, where
negative or "off" can be set to stop the GC.
Manual command setup was starting to show some strain in
terms of documentation and also adding new features
(regardless of what the protocol supports currently).
This new setup aims to make it easier to add new
documentation and functionality.
In comparison to the previous version, this increased the
binary size by 2.4M.
```
6.4M gops
4.0M gops_master
```
Use a subdirectory of the directory returned by os.UserConfigDir instead
of the UserConfigDir directly. This was missed in #103. Also add a test.
Based on a change by @42wim submitted in #107
On Go ≥ 1.13 the os package has os.ConfigDir
(https://golang.org/pkg/os/#UserConfigDir) which returns the default
root directory to use for user-specific configuration data. Use this in
internal.ConfigDir if available, while still making sure that any
directory specified in GOPS_CONFIG_DIR takes precedence.
internal object packages are no longer required
given gops depends on rsc.io/goversion/version now.
Also running dep prune to remove the packages
gops doesn't depend from the vendor directory.
Follow up of
112843115d (commitcomment-23936637)
Solves the problem of us having to manually watch
upstream and pull in bug fixes and updates, if our
internal copy goes stale.
Fixes#22.