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
cecc03ca
Commit
cecc03ca
authored
Feb 21, 2017
by
André Martins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kubectl: Adding IPv6 brackets for IPv6 endpoints
This fixes the lack of IPv6 when printing the IP:Port tuple with kubectl describe command. Signed-off-by:
André Martins
<
aanm90@gmail.com
>
parent
223c721d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
printers.go
pkg/printers/internalversion/printers.go
+4
-1
No files found.
pkg/printers/internalversion/printers.go
View file @
cecc03ca
...
@@ -20,7 +20,9 @@ import (
...
@@ -20,7 +20,9 @@ import (
"bytes"
"bytes"
"fmt"
"fmt"
"io"
"io"
"net"
"sort"
"sort"
"strconv"
"strings"
"strings"
"time"
"time"
...
@@ -223,7 +225,8 @@ func formatEndpoints(endpoints *api.Endpoints, ports sets.String) string {
...
@@ -223,7 +225,8 @@ func formatEndpoints(endpoints *api.Endpoints, ports sets.String) string {
}
}
addr
:=
&
ss
.
Addresses
[
i
]
addr
:=
&
ss
.
Addresses
[
i
]
if
!
more
{
if
!
more
{
list
=
append
(
list
,
fmt
.
Sprintf
(
"%s:%d"
,
addr
.
IP
,
port
.
Port
))
hostPort
:=
net
.
JoinHostPort
(
addr
.
IP
,
strconv
.
Itoa
(
int
(
port
.
Port
)))
list
=
append
(
list
,
hostPort
)
}
}
count
++
count
++
}
}
...
...
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