Skip to content

Commit

Permalink
Update security_policy.go
Browse files Browse the repository at this point in the history
  • Loading branch information
aidenwang9867 authored May 25, 2022
1 parent a459ac2 commit 0196433
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions checks/raw/security_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ import (
"github.com/ossf/scorecard/v4/log"
)

type SecurityPolicyFilesWithURI struct {
type securityPolicyFilesWithURI struct {
files []checker.File
uri string
}

// SecurityPolicy checks for presence of security policy.
func SecurityPolicy(c *checker.CheckRequest) (checker.SecurityPolicyData, error) {
data := SecurityPolicyFilesWithURI{
data := securityPolicyFilesWithURI{
files: make([]checker.File, 0),
uri: "",
}
Expand Down Expand Up @@ -79,9 +79,9 @@ var isSecurityPolicyFile fileparser.DoWhileTrueOnFilename = func(name string, ar
if len(args) != 1 {
return false, fmt.Errorf("isSecurityPolicyFile requires exactly one argument: %w", errInvalidArgLength)
}
pdata, ok := args[0].(*SecurityPolicyFilesWithURI)
pdata, ok := args[0].(*securityPolicyFilesWithURI)
if !ok {
return false, fmt.Errorf("isSecurityPolicyFile expects arg of type: *SecurityPolicyFilesWithURI (struct {[]checker.File string}): %w", errInvalidArgType)
return false, fmt.Errorf("isSecurityPolicyFile expects arg of type: *securityPolicyFilesWithURI (struct {[]checker.File string}): %w", errInvalidArgType)
}
if isSecurityPolicyFilename(name) {
tempPath := name
Expand Down

0 comments on commit 0196433

Please sign in to comment.