mirror of
https://github.com/anchore/syft.git
synced 2026-11-01 23:16:30 +01:00
Signed-off-by: Keith Zantow <kzantow@gmail.com> Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> Co-authored-by: Alex Goodman <wagoodman@users.noreply.github.com>
26 lines
407 B
Go
26 lines
407 B
Go
package options
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/anchore/clio"
|
|
"github.com/anchore/syft/internal/redact"
|
|
)
|
|
|
|
type secret string
|
|
|
|
var _ interface {
|
|
fmt.Stringer
|
|
clio.PostLoader
|
|
} = (*secret)(nil)
|
|
|
|
// PostLoad needs to use a pointer receiver, even if it's not modifying the value
|
|
func (r *secret) PostLoad() error {
|
|
redact.Add(string(*r))
|
|
return nil
|
|
}
|
|
|
|
func (r secret) String() string {
|
|
return string(r)
|
|
}
|