install_go: Install pprof and Go on Linux

View source: R/install.R

install_goR Documentation

Install pprof and Go on Linux

Description

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.

Usage

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

Arguments

destination

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.

version

Character, a version string such as "1.19.5".

quiet

Logical, whether to suppress console messages.

Details

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.


proffer documentation built on Feb. 16, 2023, 7:07 p.m.