Skip to content

Commit

Permalink
Manifest passthrough: add support for non-string config options
Browse files Browse the repository at this point in the history
This allows setting arbitrary configuration options in a manifest,
e.g.:
```
{
  "ManifestPassthrough": {
    "my_manifest_setting": {
      "setting1":"value1",
      "setting2":"value2"
    }
  }
}
```
  • Loading branch information
francescolavra committed Jun 16, 2021
1 parent 00827c8 commit 75f4515
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fs/manifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion types/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 75f4515

Please sign in to comment.