Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimizing some format problems #82983

Merged
merged 2 commits into from Nov 1, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions pkg/security/apparmor/validate.go
Expand Up @@ -102,7 +102,7 @@ func validateHost(runtime string) error {

// Check build support.
if isDisabledBuild {
return errors.New("Binary not compiled for linux")
return errors.New("binary not compiled for linux")
}

// Check kernel support.
Expand All @@ -112,7 +112,7 @@ func validateHost(runtime string) error {

// Check runtime support. Currently only Docker is supported.
if runtime != kubetypes.DockerContainerRuntime && runtime != kubetypes.RemoteContainerRuntime {
return fmt.Errorf("AppArmor is only enabled for 'docker' and 'remote' runtimes. Found: %q.", runtime)
return fmt.Errorf("AppArmor is only enabled for 'docker' and 'remote' runtimes. Found: %q", runtime)
}

return nil
Expand Down
8 changes: 4 additions & 4 deletions pkg/security/podsecuritypolicy/provider_test.go
Expand Up @@ -556,7 +556,7 @@ func TestValidateContainerFailures(t *testing.T) {
}

failPrivPod := defaultPod()
var priv bool = true
var priv = true
failPrivPod.Spec.Containers[0].SecurityContext.Privileged = &priv

failProcMountPod := defaultPod()
Expand Down Expand Up @@ -1043,7 +1043,7 @@ func TestValidateContainerSuccess(t *testing.T) {
privPSP := defaultPSP()
privPSP.Spec.Privileged = true
privPod := defaultPod()
var priv bool = true
var priv = true
privPod.Spec.Containers[0].SecurityContext.Privileged = &priv

capsPSP := defaultPSP()
Expand Down Expand Up @@ -1275,7 +1275,7 @@ func defaultNamedPSP(name string) *policy.PodSecurityPolicy {
}

func defaultPod() *api.Pod {
var notPriv bool = false
var notPriv = false
return &api.Pod{
ObjectMeta: metav1.ObjectMeta{
Annotations: map[string]string{},
Expand All @@ -1299,7 +1299,7 @@ func defaultPod() *api.Pod {
}

func defaultV1Pod() *v1.Pod {
var notPriv bool = false
var notPriv = false
return &v1.Pod{
ObjectMeta: metav1.ObjectMeta{
Annotations: map[string]string{},
Expand Down