fix: changing facets reverted to combined search
1 file changed, 12 insertions(+), 0 deletions(-)
changed files
M internal/config/structs.go → internal/config/structs.go
@@ -5,6 +5,7 @@ // keep config structs here so that lll ignores the long lines (go doesn't support multi-line struct tags) import ( "fmt" + "net/url" "path/filepath" "strings"@@ -90,3 +91,14 @@ func (source *Source) JoinFilePath(name string) string { //nolint:forbidigo // is not absolute return filepath.Join("sources", source.Key, name) } + +func (source *Source) LocalURL() *url.URL { + p, err := url.JoinPath("/", source.Importer.String(), source.Key, "/") + if err != nil { + panic(err.Error()) + } + + return &url.URL{ + Path: p, + } +}