diff options
| author | Paul Duncan <pabs@pablotron.org> | 2022-03-19 00:17:22 -0400 | 
|---|---|---|
| committer | Paul Duncan <pabs@pablotron.org> | 2022-03-19 00:17:22 -0400 | 
| commit | 6d113c1ac4001ecb97ff430a264b7232324b0e26 (patch) | |
| tree | bba4cf3276ee21e05f750480c9586fb0bc9a54ea /nvdmirror/sync.go | |
| parent | bc29bd5fa5e3c640c8a66d5428fd5e1ca60c4a26 (diff) | |
| download | cvez-6d113c1ac4001ecb97ff430a264b7232324b0e26.tar.xz cvez-6d113c1ac4001ecb97ff430a264b7232324b0e26.zip  | |
nvdmirror: use Update internally and return Update from Sync()
Diffstat (limited to 'nvdmirror/sync.go')
| -rw-r--r-- | nvdmirror/sync.go | 8 | 
1 files changed, 4 insertions, 4 deletions
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() },    ))  }  | 
