lang: funcs: Add deploy package with readfile related functions
This adds a readfile function to actually access files from our deploy. A fun side effect is that we can even access our own code! In general, it's a good reminder that you should only run trusted code on your own infrastructure. This also includes a fancy new test case.
This commit is contained in:
@@ -35,6 +35,8 @@ func init() {
|
||||
|
||||
// ReadFileFunc is a function that reads the full contents from a local file. If
|
||||
// the file contents change or the file path changes, a new string will be sent.
|
||||
// Please note that this is different from the readfile function in the deploy
|
||||
// package.
|
||||
type ReadFileFunc struct {
|
||||
init *interfaces.Init
|
||||
last types.Value // last value received to use for diff
|
||||
|
||||
Reference in New Issue
Block a user