Files
trivy/pkg/iac/scanners/terraform/parser/resolvers/options.go
Nikita Pivkin bfdf5cfc30 refactor(misconf): use slog (#7295)
Signed-off-by: nikpivkin <nikita.pivkin@smartforce.io>
2024-08-23 04:27:17 +00:00

26 lines
803 B
Go

package resolvers
import (
"strings"
"github.com/aquasecurity/trivy/pkg/log"
)
type Options struct {
Source, OriginalSource, Version, OriginalVersion, WorkingDir, Name, ModulePath string
Logger *log.Logger
AllowDownloads bool
SkipCache bool
RelativePath string
CacheDir string
}
func (o *Options) hasPrefix(prefixes ...string) bool {
for _, prefix := range prefixes {
if strings.HasPrefix(o.Source, prefix) {
return true
}
}
return false
}