Documentation
¶
Overview ¶
Copyright 2022 The Go Authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
Index ¶
- func AbsRelShorter(path string) string
- func Flush(h govulncheck.Handler) error
- func RunGovulncheck(ctx context.Context, env []string, r io.Reader, stdout io.Writer, ...) error
- type FormatFlag
- type ModeFlag
- type ScanFlag
- type ShowFlag
- type TextHandler
- func (h *TextHandler) Config(config *govulncheck.Config) error
- func (h *TextHandler) Finding(finding *govulncheck.Finding) error
- func (h *TextHandler) Flush() error
- func (h *TextHandler) OSV(entry *osv.Entry) error
- func (h *TextHandler) Progress(progress *govulncheck.Progress) error
- func (h *TextHandler) SBOM(sbom *govulncheck.SBOM) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AbsRelShorter ¶
AbsRelShorter takes path and returns its path relative to the current directory, if shorter. Returns path when path is an empty string or upon any error.
func Flush ¶
func Flush(h govulncheck.Handler) error
Types ¶
type FormatFlag ¶
type FormatFlag string
FormatFlag is used for parsing and validation of govulncheck -format flag.
func (*FormatFlag) Get ¶
func (f *FormatFlag) Get() interface{}
func (*FormatFlag) Set ¶
func (f *FormatFlag) Set(s string) error
func (*FormatFlag) String ¶
func (f *FormatFlag) String() string
type ModeFlag ¶
type ModeFlag string
ModeFlag is used for parsing and validation of govulncheck -mode flag.
type ScanFlag ¶
type ScanFlag string
ScanFlag is used for parsing and validation of govulncheck -scan flag.
type ShowFlag ¶
type ShowFlag []string
ShowFlag is used for parsing and validation of govulncheck -show flag.
func (ShowFlag) Update ¶
func (v ShowFlag) Update(h *TextHandler)
Update the text handler h with values of the flag.
type TextHandler ¶
type TextHandler struct {
// contains filtered or unexported fields
}
func NewTextHandler ¶
func NewTextHandler(w io.Writer) *TextHandler
NewtextHandler returns a handler that writes govulncheck output as text.
func (*TextHandler) Config ¶
func (h *TextHandler) Config(config *govulncheck.Config) error
Config writes version information only if --version was set.
func (*TextHandler) Finding ¶
func (h *TextHandler) Finding(finding *govulncheck.Finding) error
Finding gathers vulnerability findings to be written.
func (*TextHandler) Flush ¶
func (h *TextHandler) Flush() error
func (*TextHandler) OSV ¶
func (h *TextHandler) OSV(entry *osv.Entry) error
OSV gathers osv entries to be written.
func (*TextHandler) Progress ¶
func (h *TextHandler) Progress(progress *govulncheck.Progress) error
Progress writes progress updates during govulncheck execution.
func (*TextHandler) SBOM ¶
func (h *TextHandler) SBOM(sbom *govulncheck.SBOM) error