1
0
Fork 0
mirror of https://github.com/gocsaf/csaf.git synced 2025-12-22 11:55:40 +01:00

Add extra http header support to downloader and checker.

This commit is contained in:
Sascha L. Teichmann 2023-01-25 16:45:05 +01:00
parent 732383561b
commit 51fba46893
7 changed files with 117 additions and 41 deletions

View file

@ -12,6 +12,7 @@ package main
import (
"fmt"
"log"
"net/http"
"os"
"github.com/csaf-poc/csaf_distribution/util"
@ -19,11 +20,12 @@ import (
)
type options struct {
Directory *string `short:"d" long:"directory" description:"Directory to store the downloaded files in"`
Insecure bool `long:"insecure" description:"Do not check TLS certificates from provider"`
Version bool `long:"version" description:"Display version of the binary"`
Verbose bool `long:"verbose" short:"v" description:"Verbose output"`
Rate *float64 `long:"rate" short:"r" description:"The average upper limit of https operations per second"`
Directory *string `short:"d" long:"directory" description:"Directory to store the downloaded files in"`
Insecure bool `long:"insecure" description:"Do not check TLS certificates from provider"`
Version bool `long:"version" description:"Display version of the binary"`
Verbose bool `long:"verbose" short:"v" description:"Verbose output"`
Rate *float64 `long:"rate" short:"r" description:"The average upper limit of https operations per second"`
ExtraHeader http.Header `long:"header" short:"H" description:"One or more extra HTTP header fields"`
}
func errCheck(err error) {