From 6d113c1ac4001ecb97ff430a264b7232324b0e26 Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Sat, 19 Mar 2022 00:17:22 -0400 Subject: nvdmirror: use Update internally and return Update from Sync() --- nvdmirror/sync.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'nvdmirror/sync.go') diff --git a/nvdmirror/sync.go b/nvdmirror/sync.go index c7a82c1..65a23cf 100644 --- a/nvdmirror/sync.go +++ b/nvdmirror/sync.go @@ -37,7 +37,7 @@ package nvdmirror // * user-agent: User agent from config, or the default user agent if // the config value is unspecified. // -func Sync(config SyncConfig, cache Cache, dstDir string) []string { +func Sync(config SyncConfig, cache Cache, dstDir string) []Update { // build sync context ctx := newSyncContext(config, cache, dstDir) @@ -45,8 +45,8 @@ func Sync(config SyncConfig, cache Cache, dstDir string) []string { // fetch updated files, and then return a list of changed files return ctx.syncUrls(append( ctx.checkMetas(ctx.fetchMetas()), - config.GetCpeDictUrl(), - config.GetCisaKevcUrl(), - config.GetCweListUrl(), + Update { Type: UpdateCpeDict, Url: config.GetCpeDictUrl() }, + Update { Type: UpdateCisaKevc, Url: config.GetCisaKevcUrl() }, + Update { Type: UpdateCweList, Url: config.GetCweListUrl() }, )) } -- cgit v1.2.3