From 019643307dba1298c7efe957372952894e9e3975 Mon Sep 17 00:00:00 2001 From: Aiden Wang <54022336+aidenwang9867@users.noreply.github.com> Date: Wed, 25 May 2022 16:51:13 -0700 Subject: [PATCH] Update security_policy.go --- checks/raw/security_policy.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/checks/raw/security_policy.go b/checks/raw/security_policy.go index 474938dca14..e031c0941cb 100644 --- a/checks/raw/security_policy.go +++ b/checks/raw/security_policy.go @@ -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: "", } @@ -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