On Linux, this function actually installs Go, which comes with its own installation of pprof. On Mac and Windows, the function simply points the user to a link to download the installer. Assumes amd64 architecture.

install_go(destination = Sys.getenv("HOME"), version = "1.14", quiet = FALSE)



Only relevant to Linux, full path to the Go installation with the pprof and Go executables. Defaults to Sys.getenv("HOME"), which means the default Go installation path is file.path(Sys.getenv("HOME"), "go"). That means the Go binary will be at file.path(Sys.getenv("HOME"), "go/bin/go") and pprof will be at file.path(Sys.getenv("HOME"), "go/pkg/tool/linux_amd64/pprof"). You will need to set environment variables in your .Renviron file, e.g. PROFFER_PPROF_BIN=/home/you/go/pkg/tool/linux_amd64/pprof and PROFFER_GO_BIN=/home/you/go/bin/go. usethis::edit_r_environ() is helpful for this.


Character, a version string such as "1.14".


Logical, whether to suppress console messages.


On Linux, users will need to set the environment variables PROFFER_PPROF_BIN and PROFFER_GO_BIN using usethis::edit_r_environ(). Typically, if destination is /home/you, then typically those lines look like PROFFER_GO_BIN=/home/you/go/pkg/tool/linux_amd64/pprof PROFFER_PPROF_BIN=/home/you/go/bin/go.