sniff_one | R Documentation |
scan one secret string across many paths
sniff_one(path, secret_string)
path |
(character) path to fixtures directory. required |
secret_string |
(character) a character string to look for. required |
a named list, with vector of line numbers for where string found; if none found an empty list
## Not run: Sys.setenv(A_KEY = "a8d#d%d7g7g4012a4s2") path <- file.path(tempdir(), "foobar") dir.create(path) # no matches sniff_one(path, Sys.getenv("A_KEY")) # add files with the secret cat(paste0("foo\nbar\nhello\nworld\n", Sys.getenv("A_KEY"), "\n"), file = file.path(path, "stuff.R")) # matches! sniff_one(path, Sys.getenv("A_KEY")) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.