config.FileContent

This commit is contained in:
Mikaël Cluseau 2022-03-30 12:13:41 +02:00
parent 070ea02679
commit 28a99f5c2b

View File

@ -133,3 +133,12 @@ type NetworkDef struct {
Optional bool Optional bool
Script string Script string
} }
func (c *Config) FileContent(filePath string) []byte {
for _, f := range c.Files {
if f.Path == filePath {
return []byte(f.Content)
}
}
return nil
}