feat: store fetched files in data directory
1 file changed, 6 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" + "path/filepath" "strings" "github.com/creasty/defaults"@@ -83,3 +84,8 @@ if defaults.CanUpdate(source.Name) { source.Name = strings.ToTitle(source.Key[0:1]) + source.Key[1:] } } + +func (source *Source) JoinPath(name string) string { + //nolint:forbidigo // is not absolute + return filepath.Join("sources", source.Key, name) +}