Skip to content

Commit 3750449

Browse files
committedOct 31, 2018
Updated comments to be consistent and correct
1 parent aed3c55 commit 3750449

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed
 

‎pkg/kritis/crd/authority/authority.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ import (
2828
type Lister func(namespace string) ([]v1beta1.AttestationAuthority, error)
2929
type Fetcher func(namespace string, name string) (v1beta1.AttestationAuthority, error)
3030

31-
// Authorities returns all AttestationAuthority in the specified namespaces
32-
// Pass in an empty string to get all ISPs in all namespaces
31+
// Authorities returns all AttestationAuthorities in the specified namespaces
32+
// Pass in an empty string to get all AttestationAuthorities in all namespaces
3333
func Authorities(namespace string) ([]v1beta1.AttestationAuthority, error) {
3434
config, err := rest.InClusterConfig()
3535
if err != nil {
@@ -47,8 +47,8 @@ func Authorities(namespace string) ([]v1beta1.AttestationAuthority, error) {
4747
return list.Items, nil
4848
}
4949

50-
// Authority returns the AttestationAuthority in the specified namespace.
51-
// Returns error if AttestationAuthority not found
50+
// Authority returns the AttestationAuthority in the specified namespace and with the given name
51+
// Returns error if AttestationAuthority is not found
5252
func Authority(namespace string, name string) (*v1beta1.AttestationAuthority, error) {
5353
config, err := rest.InClusterConfig()
5454
if err != nil {

‎pkg/kritis/crd/buildpolicy/buildpolicy.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ import (
2929
// ValidateFunc defines the type for Validating Build Policies
3030
type ValidateFunc func(bp v1beta1.BuildPolicy, buildFrom string) error
3131

32-
// BuildPolicies returns all ISP's in the specified namespaces
33-
// Pass in an empty string to get all ISPs in all namespaces
32+
// BuildPolicies returns all BuildPolicies in the specified namespaces
33+
// Pass in an empty string to get all BuildPolicies in all namespaces
3434
func BuildPolicies(namespace string) ([]v1beta1.BuildPolicy, error) {
3535
config, err := rest.InClusterConfig()
3636
if err != nil {
@@ -48,8 +48,8 @@ func BuildPolicies(namespace string) ([]v1beta1.BuildPolicy, error) {
4848
return list.Items, nil
4949
}
5050

51-
// ValidateBuildPolicy checks if an image satisfies BP requirements.
52-
// It returns an error if an image does not pass,
51+
// ValidateBuildPolicy checks if an image satisfies BuildPolicy requirements
52+
// It returns an error if an image does not pass
5353
func ValidateBuildPolicy(bp v1beta1.BuildPolicy, builtFrom string) error {
5454
ok, err := regexp.MatchString(bp.Spec.BuildRequirements.BuiltFrom, builtFrom)
5555
if err != nil {

‎pkg/kritis/crd/securitypolicy/securitypolicy.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import (
3333
// ValidateFunc defines the type for Validating Image Security Policies
3434
type ValidateFunc func(isp v1beta1.ImageSecurityPolicy, image string, client metadata.Fetcher) ([]policy.Violation, error)
3535

36-
// ImageSecurityPolicies returns all ISP's in the specified namespaces
36+
// ImageSecurityPolicies returns all ISPs in the specified namespaces
3737
// Pass in an empty string to get all ISPs in all namespaces
3838
func ImageSecurityPolicies(namespace string) ([]v1beta1.ImageSecurityPolicy, error) {
3939
config, err := rest.InClusterConfig()

0 commit comments

Comments
 (0)
Please sign in to comment.