Skip to content

Commit 4ec29a1

Browse files
authored
Merge pull request kubernetes#76889 from SataQiu/fix-golint-kubelet-util-20190422
Fix golint failures of pkg/kubelet/util
2 parents b9606be + cd6828b commit 4ec29a1

File tree

5 files changed

+7
-2
lines changed

5 files changed

+7
-2
lines changed

hack/.golint_failures

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,6 @@ pkg/kubelet/status
204204
pkg/kubelet/status/testing
205205
pkg/kubelet/sysctl
206206
pkg/kubelet/types
207-
pkg/kubelet/util
208207
pkg/kubelet/util/pluginwatcher
209208
pkg/kubemark
210209
pkg/master

pkg/kubelet/util/doc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
// Utility functions.
17+
// Package util holds utility functions.
1818
package util // import "k8s.io/kubernetes/pkg/kubelet/util"

pkg/kubelet/util/util_unix.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ const (
3535
unixProtocol = "unix"
3636
)
3737

38+
// CreateListener creates a listener on the specified endpoint.
3839
func CreateListener(endpoint string) (net.Listener, error) {
3940
protocol, addr, err := parseEndpointWithFallbackProtocol(endpoint, unixProtocol)
4041
if err != nil {
@@ -53,6 +54,7 @@ func CreateListener(endpoint string) (net.Listener, error) {
5354
return net.Listen(protocol, addr)
5455
}
5556

57+
// GetAddressAndDialer returns the address parsed from the given endpoint and a dialer.
5658
func GetAddressAndDialer(endpoint string) (string, func(addr string, timeout time.Duration) (net.Conn, error), error) {
5759
protocol, addr, err := parseEndpointWithFallbackProtocol(endpoint, unixProtocol)
5860
if err != nil {

pkg/kubelet/util/util_unsupported.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,12 @@ import (
2424
"time"
2525
)
2626

27+
// CreateListener creates a listener on the specified endpoint.
2728
func CreateListener(endpoint string) (net.Listener, error) {
2829
return nil, fmt.Errorf("CreateListener is unsupported in this build")
2930
}
3031

32+
// GetAddressAndDialer returns the address parsed from the given endpoint and a dialer.
3133
func GetAddressAndDialer(endpoint string) (string, func(addr string, timeout time.Duration) (net.Conn, error), error) {
3234
return "", nil, fmt.Errorf("GetAddressAndDialer is unsupported in this build")
3335
}

pkg/kubelet/util/util_windows.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ const (
3434
npipeProtocol = "npipe"
3535
)
3636

37+
// CreateListener creates a listener on the specified endpoint.
3738
func CreateListener(endpoint string) (net.Listener, error) {
3839
protocol, addr, err := parseEndpoint(endpoint)
3940
if err != nil {
@@ -52,6 +53,7 @@ func CreateListener(endpoint string) (net.Listener, error) {
5253
}
5354
}
5455

56+
// GetAddressAndDialer returns the address parsed from the given endpoint and a dialer.
5557
func GetAddressAndDialer(endpoint string) (string, func(addr string, timeout time.Duration) (net.Conn, error), error) {
5658
protocol, addr, err := parseEndpoint(endpoint)
5759
if err != nil {

0 commit comments

Comments
 (0)