From 155803de7d5c1df5edd456a45a19008c9ae5ea7b Mon Sep 17 00:00:00 2001 From: Dave Henderson Date: Sun, 9 Jan 2022 17:12:13 -0500 Subject: Propagate context into datasource read functions (#1282) Signed-off-by: Dave Henderson --- data/datasource_file.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'data/datasource_file.go') diff --git a/data/datasource_file.go b/data/datasource_file.go index 175f92f0..ce86c0a2 100644 --- a/data/datasource_file.go +++ b/data/datasource_file.go @@ -2,6 +2,7 @@ package data import ( "bytes" + "context" "encoding/json" "io/ioutil" "net/url" @@ -14,7 +15,7 @@ import ( "github.com/pkg/errors" ) -func readFile(source *Source, args ...string) ([]byte, error) { +func readFile(ctx context.Context, source *Source, args ...string) ([]byte, error) { if source.fs == nil { source.fs = afero.NewOsFs() } -- cgit v1.2.3