R/install-zdns.R

Defines functions install_zdns

Documented in install_zdns

#' Helper to try to get zdns installed
#' @export
install_zdns <- function() {

  res <- Sys.which("go")
  if (res == "") {
    packageStartupMessage(
      "Go (golang) not found. Please install Go (https://golang.org/dl/) for ",
      "your platform and try reloading the package again."
    )
  } else {
    message(
      "Attempting to install Go (golang). Please monitor the output for any ",
      "errors that might occur during installation.")
    res <- system2("go", c("get", "github.com/zmap/zdns/zdns"), stdout="")
  }

}
hrbrmstr/zdnsr documentation built on Feb. 28, 2020, 9:35 a.m.