Skip to content

Commit 6bbad88

Browse files
author
OpenShift Bot
authoredJun 28, 2017
Merge pull request #14841 from abstractj/issue-12393
Merged by openshift-bot
2 parents a67ac87 + e1c6d62 commit 6bbad88

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed
 

‎hack/verify-gofmt.sh

+3-4
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@ os::golang::verify_go_version
55

66
bad_files=$(os::util::list_go_src_files | xargs gofmt -s -l)
77
if [[ -n "${bad_files}" ]]; then
8-
echo "!!! gofmt needs to be run on the following files: " >&2
8+
os::log::warning "!!! gofmt needs to be run on the following files: "
99
echo "${bad_files}"
10-
echo "Try running 'gofmt -s -d [path]'" >&2
11-
echo "Or autocorrect with 'hack/verify-gofmt.sh | xargs -n 1 gofmt -s -w'" >&2
12-
exit 1
10+
os::log::fatal "Try running 'gofmt -s -d [path]'
11+
Or autocorrect with 'hack/verify-gofmt.sh | xargs -n 1 gofmt -s -w'"
1312
fi

‎hack/verify-govet.sh

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ source "$(dirname "${BASH_SOURCE}")/lib/init.sh"
44
os::golang::verify_go_version
55

66
govet_blacklist=(
7-
"pkg/auth/ldaputil/client.go:[0-9]+: assignment copies lock value to c: crypto/tls.Config contains sync.Once contains sync.Mutex"
87
"pkg/.*/client/clientset_generated/internalclientset/fake/clientset_generated.go:[0-9]+: literal copies lock value from fakePtr: github.com/openshift/origin/vendor/k8s.io/kubernetes/pkg/client/testing/core.Fake"
98
"pkg/.*/client/clientset_generated/release_v1_./fake/clientset_generated.go:[0-9]+: literal copies lock value from fakePtr: github.com/openshift/origin/vendor/k8s.io/kubernetes/pkg/client/testing/core.Fake"
109
"pkg/.*/clientset/internalclientset/fake/clientset_generated.go:[0-9]+: literal copies lock value from fakePtr: github.com/openshift/origin/vendor/k8s.io/kubernetes/pkg/client/testing/core.Fake"

‎pkg/auth/ldaputil/client.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"fmt"
66
"net"
77

8+
utilnet "k8s.io/apimachinery/pkg/util/net"
89
"k8s.io/client-go/util/cert"
910

1011
"github.com/openshift/origin/pkg/auth/ldaputil/ldapclient"
@@ -66,13 +67,13 @@ func (l *ldapClientConfig) Connect() (ldap.Client, error) {
6667
// Ensure tlsConfig specifies the server we're connecting to
6768
if tlsConfig != nil && !tlsConfig.InsecureSkipVerify && len(tlsConfig.ServerName) == 0 {
6869
// Add to a copy of the tlsConfig to avoid mutating the original
69-
c := *tlsConfig
70+
c := utilnet.CloneTLSConfig(tlsConfig)
7071
if host, _, err := net.SplitHostPort(l.host); err == nil {
7172
c.ServerName = host
7273
} else {
7374
c.ServerName = l.host
7475
}
75-
tlsConfig = &c
76+
tlsConfig = c
7677
}
7778

7879
switch l.scheme {

0 commit comments

Comments
 (0)
Please sign in to comment.