grype/cmd/util.go
Alex Goodman 86b7d165e2
Add db list command (#506)
* add db list command

Signed-off-by: Alex Goodman <alex.goodman@anchore.com>

* add stderr print helper

Signed-off-by: Alex Goodman <alex.goodman@anchore.com>

* update docs to with details about listing files and DB curation

Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
2021-12-03 16:43:50 +00:00

15 lines
241 B
Go

package cmd
import (
"fmt"
"os"
"strings"
)
func stderrPrintLnf(message string, args ...interface{}) error {
if !strings.HasSuffix(message, "\n") {
message += "\n"
}
_, err := fmt.Fprintf(os.Stderr, message, args...)
return err
}