From 75f45154ffa50598521a83543b0b945eb1f33dbb Mon Sep 17 00:00:00 2001 From: Francesco Lavra Date: Wed, 16 Jun 2021 08:40:16 +0200 Subject: [PATCH] Manifest passthrough: add support for non-string config options This allows setting arbitrary configuration options in a manifest, e.g.: ``` { "ManifestPassthrough": { "my_manifest_setting": { "setting1":"value1", "setting2":"value2" } } } ``` --- fs/manifest.go | 2 +- types/config.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/manifest.go b/fs/manifest.go index e716b734..f1fd1434 100644 --- a/fs/manifest.go +++ b/fs/manifest.go @@ -367,7 +367,7 @@ func (m *Manifest) AddLibrary(path string) { } // AddPassthrough to add key, value directly to manifest -func (m *Manifest) AddPassthrough(key, value string) { +func (m *Manifest) AddPassthrough(key string, value interface{}) { m.root[key] = value } diff --git a/types/config.go b/types/config.go index 51a80d2d..690229a7 100644 --- a/types/config.go +++ b/types/config.go @@ -65,7 +65,7 @@ type Config struct { NoTrace []string // Straight passthrough of options to manifest - ManifestPassthrough map[string]string + ManifestPassthrough map[string]interface{} // Program Program string