Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
cd6828ba
Commit
cd6828ba
authored
Apr 22, 2019
by
SataQiu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix golint failures of pkg/kubelet/util
parent
75d45bdf
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
2 deletions
+7
-2
.golint_failures
hack/.golint_failures
+0
-1
doc.go
pkg/kubelet/util/doc.go
+1
-1
util_unix.go
pkg/kubelet/util/util_unix.go
+2
-0
util_unsupported.go
pkg/kubelet/util/util_unsupported.go
+2
-0
util_windows.go
pkg/kubelet/util/util_windows.go
+2
-0
No files found.
hack/.golint_failures
View file @
cd6828ba
...
@@ -206,7 +206,6 @@ pkg/kubelet/status
...
@@ -206,7 +206,6 @@ pkg/kubelet/status
pkg/kubelet/status/testing
pkg/kubelet/status/testing
pkg/kubelet/sysctl
pkg/kubelet/sysctl
pkg/kubelet/types
pkg/kubelet/types
pkg/kubelet/util
pkg/kubelet/util/pluginwatcher
pkg/kubelet/util/pluginwatcher
pkg/kubemark
pkg/kubemark
pkg/master
pkg/master
...
...
pkg/kubelet/util/doc.go
View file @
cd6828ba
...
@@ -14,5 +14,5 @@ See the License for the specific language governing permissions and
...
@@ -14,5 +14,5 @@ See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
*/
*/
//
U
tility functions.
//
Package util holds u
tility functions.
package
util
// import "k8s.io/kubernetes/pkg/kubelet/util"
package
util
// import "k8s.io/kubernetes/pkg/kubelet/util"
pkg/kubelet/util/util_unix.go
View file @
cd6828ba
...
@@ -35,6 +35,7 @@ const (
...
@@ -35,6 +35,7 @@ const (
unixProtocol
=
"unix"
unixProtocol
=
"unix"
)
)
// CreateListener creates a listener on the specified endpoint.
func
CreateListener
(
endpoint
string
)
(
net
.
Listener
,
error
)
{
func
CreateListener
(
endpoint
string
)
(
net
.
Listener
,
error
)
{
protocol
,
addr
,
err
:=
parseEndpointWithFallbackProtocol
(
endpoint
,
unixProtocol
)
protocol
,
addr
,
err
:=
parseEndpointWithFallbackProtocol
(
endpoint
,
unixProtocol
)
if
err
!=
nil
{
if
err
!=
nil
{
...
@@ -53,6 +54,7 @@ func CreateListener(endpoint string) (net.Listener, error) {
...
@@ -53,6 +54,7 @@ func CreateListener(endpoint string) (net.Listener, error) {
return
net
.
Listen
(
protocol
,
addr
)
return
net
.
Listen
(
protocol
,
addr
)
}
}
// GetAddressAndDialer returns the address parsed from the given endpoint and a dialer.
func
GetAddressAndDialer
(
endpoint
string
)
(
string
,
func
(
addr
string
,
timeout
time
.
Duration
)
(
net
.
Conn
,
error
),
error
)
{
func
GetAddressAndDialer
(
endpoint
string
)
(
string
,
func
(
addr
string
,
timeout
time
.
Duration
)
(
net
.
Conn
,
error
),
error
)
{
protocol
,
addr
,
err
:=
parseEndpointWithFallbackProtocol
(
endpoint
,
unixProtocol
)
protocol
,
addr
,
err
:=
parseEndpointWithFallbackProtocol
(
endpoint
,
unixProtocol
)
if
err
!=
nil
{
if
err
!=
nil
{
...
...
pkg/kubelet/util/util_unsupported.go
View file @
cd6828ba
...
@@ -24,10 +24,12 @@ import (
...
@@ -24,10 +24,12 @@ import (
"time"
"time"
)
)
// CreateListener creates a listener on the specified endpoint.
func
CreateListener
(
endpoint
string
)
(
net
.
Listener
,
error
)
{
func
CreateListener
(
endpoint
string
)
(
net
.
Listener
,
error
)
{
return
nil
,
fmt
.
Errorf
(
"CreateListener is unsupported in this build"
)
return
nil
,
fmt
.
Errorf
(
"CreateListener is unsupported in this build"
)
}
}
// GetAddressAndDialer returns the address parsed from the given endpoint and a dialer.
func
GetAddressAndDialer
(
endpoint
string
)
(
string
,
func
(
addr
string
,
timeout
time
.
Duration
)
(
net
.
Conn
,
error
),
error
)
{
func
GetAddressAndDialer
(
endpoint
string
)
(
string
,
func
(
addr
string
,
timeout
time
.
Duration
)
(
net
.
Conn
,
error
),
error
)
{
return
""
,
nil
,
fmt
.
Errorf
(
"GetAddressAndDialer is unsupported in this build"
)
return
""
,
nil
,
fmt
.
Errorf
(
"GetAddressAndDialer is unsupported in this build"
)
}
}
...
...
pkg/kubelet/util/util_windows.go
View file @
cd6828ba
...
@@ -34,6 +34,7 @@ const (
...
@@ -34,6 +34,7 @@ const (
npipeProtocol
=
"npipe"
npipeProtocol
=
"npipe"
)
)
// CreateListener creates a listener on the specified endpoint.
func
CreateListener
(
endpoint
string
)
(
net
.
Listener
,
error
)
{
func
CreateListener
(
endpoint
string
)
(
net
.
Listener
,
error
)
{
protocol
,
addr
,
err
:=
parseEndpoint
(
endpoint
)
protocol
,
addr
,
err
:=
parseEndpoint
(
endpoint
)
if
err
!=
nil
{
if
err
!=
nil
{
...
@@ -52,6 +53,7 @@ func CreateListener(endpoint string) (net.Listener, error) {
...
@@ -52,6 +53,7 @@ func CreateListener(endpoint string) (net.Listener, error) {
}
}
}
}
// GetAddressAndDialer returns the address parsed from the given endpoint and a dialer.
func
GetAddressAndDialer
(
endpoint
string
)
(
string
,
func
(
addr
string
,
timeout
time
.
Duration
)
(
net
.
Conn
,
error
),
error
)
{
func
GetAddressAndDialer
(
endpoint
string
)
(
string
,
func
(
addr
string
,
timeout
time
.
Duration
)
(
net
.
Conn
,
error
),
error
)
{
protocol
,
addr
,
err
:=
parseEndpoint
(
endpoint
)
protocol
,
addr
,
err
:=
parseEndpoint
(
endpoint
)
if
err
!=
nil
{
if
err
!=
nil
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment