util

package
v0.9.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 6, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CveIDPattern = regexp.MustCompile(`CVE-\d{4}-\d{4,}`)

CveIDPattern is regexp matches to `CVE-\d{4}-\d{4,}`

Functions

func UniqueStrings

func UniqueStrings(s []string) []string

UniqueStrings eliminates duplication from []string

Types

type FetchRequest

type FetchRequest struct {
	Target        string
	URL           string
	MIMEType      MIMEType
	LogSuppressed bool
}

FetchRequest has url, mimetype and fetch option

type FetchResult

type FetchResult struct {
	Target        string
	URL           string
	Body          []byte
	LogSuppressed bool
}

FetchResult has url and OVAL definitions

func FetchFeedFiles

func FetchFeedFiles(reqs []FetchRequest) (results []FetchResult, err error)

FetchFeedFiles :

type MIMEType

type MIMEType int

MIMEType :

const (
	// MIMETypeXML :
	MIMETypeXML MIMEType = iota
	// MIMETypeTxt :
	MIMETypeTxt
	// MIMETypeJSON :
	MIMETypeJSON
	// MIMETypeYml :
	MIMETypeYml
	// MIMETypeHTML :
	MIMETypeHTML
	// MIMETypeBzip2 :
	MIMETypeBzip2
	// MIMETypeXz :
	MIMETypeXz
	// MIMETypeGzip :
	MIMETypeGzip
)

func (MIMEType) String

func (m MIMEType) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL