This commit is contained in:
Shreyas Goenka 2024-09-24 14:50:38 +02:00
parent 5c351d7ea3
commit e9426bea8c
No known key found for this signature in database
GPG Key ID: 92A07DF49CCB0622
1 changed files with 1 additions and 2 deletions

View File

@ -8,8 +8,7 @@ import (
// SetLocation sets the location of all values in the bundle to the given path.
// This is useful for testing where we need to associate configuration
// with the path it is loaded from.
// TODO: Go patch the location.
func SetLocation(b *bundle.Bundle, prefix string, filePath string) {
func SetLocation(b *bundle.Bundle, prefix string, locations []dyn.Location) {
start := dyn.MustPathFromString(prefix)
b.Config.Mutate(func(root dyn.Value) (dyn.Value, error) {
return dyn.Walk(root, func(p dyn.Path, v dyn.Value) (dyn.Value, error) {