From 28a99f5c2b2ac08ffeee24323209e7b4698bff39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mika=C3=ABl=20Cluseau?= Date: Wed, 30 Mar 2022 12:13:41 +0200 Subject: [PATCH] config.FileContent --- config/config.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/config/config.go b/config/config.go index d7434a4..3957508 100644 --- a/config/config.go +++ b/config/config.go @@ -133,3 +133,12 @@ type NetworkDef struct { Optional bool Script string } + +func (c *Config) FileContent(filePath string) []byte { + for _, f := range c.Files { + if f.Path == filePath { + return []byte(f.Content) + } + } + return nil +}