mirror of
https://github.com/gocsaf/csaf.git
synced 2025-12-22 05:40:11 +01:00
Add CSAF downloader
* Dense and refactor ROLIE code in aggregator a bit. * Move advisory file processor to csaf package. * Fix minor typo on main readme
This commit is contained in:
parent
640ef64df9
commit
b359fd0a62
20 changed files with 929 additions and 239 deletions
|
|
@ -13,12 +13,8 @@ import (
|
|||
"strings"
|
||||
)
|
||||
|
||||
// BaseURL returns the base URL for a given URL p.
|
||||
func BaseURL(p string) (string, error) {
|
||||
u, err := url.Parse(p)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
// BaseURL returns the base URL for a given URL.
|
||||
func BaseURL(u *url.URL) (string, error) {
|
||||
ep := u.EscapedPath()
|
||||
if idx := strings.LastIndexByte(ep, '/'); idx != -1 {
|
||||
ep = ep[:idx+1]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue