mirror of
https://github.com/aquasecurity/trivy.git
synced 2025-12-23 07:29:00 -08:00
refactor: fix auth error handling (#7615)
Signed-off-by: knqyf263 <knqyf263@gmail.com>
This commit is contained in:
@@ -57,7 +57,7 @@ type Artifact struct {
|
||||
}
|
||||
|
||||
// NewArtifact returns a new artifact
|
||||
func NewArtifact(repo string, quiet bool, registryOpt types.RegistryOptions, opts ...Option) (*Artifact, error) {
|
||||
func NewArtifact(repo string, quiet bool, registryOpt types.RegistryOptions, opts ...Option) *Artifact {
|
||||
art := &Artifact{
|
||||
repository: repo,
|
||||
quiet: quiet,
|
||||
@@ -67,7 +67,7 @@ func NewArtifact(repo string, quiet bool, registryOpt types.RegistryOptions, opt
|
||||
for _, o := range opts {
|
||||
o(art)
|
||||
}
|
||||
return art, nil
|
||||
return art
|
||||
}
|
||||
|
||||
func (a *Artifact) populate(ctx context.Context, opt types.RegistryOptions) error {
|
||||
|
||||
Reference in New Issue
Block a user