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
31c4d158
Commit
31c4d158
authored
Jan 05, 2017
by
shiywang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move wideHeader string into handlerEntry
change var name, remove formatWideHeaders() go fmt
parent
38d57e5a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
resource_printer.go
pkg/kubectl/resource_printer.go
+0
-0
resource_printer_test.go
pkg/kubectl/resource_printer_test.go
+3
-3
No files found.
pkg/kubectl/resource_printer.go
View file @
31c4d158
This diff is collapsed.
Click to expand it.
pkg/kubectl/resource_printer_test.go
View file @
31c4d158
...
...
@@ -256,7 +256,7 @@ func ErrorPrintHandler(obj *TestPrintType, w io.Writer, options PrintOptions) er
func
TestCustomTypePrinting
(
t
*
testing
.
T
)
{
columns
:=
[]
string
{
"Data"
}
printer
:=
NewHumanReadablePrinter
(
PrintOptions
{})
printer
.
Handler
(
columns
,
PrintCustomType
)
printer
.
Handler
(
columns
,
nil
,
PrintCustomType
)
obj
:=
TestPrintType
{
"test object"
}
buffer
:=
&
bytes
.
Buffer
{}
...
...
@@ -273,7 +273,7 @@ func TestCustomTypePrinting(t *testing.T) {
func
TestCustomTypePrintingWithKind
(
t
*
testing
.
T
)
{
columns
:=
[]
string
{
"Data"
}
printer
:=
NewHumanReadablePrinter
(
PrintOptions
{})
printer
.
Handler
(
columns
,
PrintCustomType
)
printer
.
Handler
(
columns
,
nil
,
PrintCustomType
)
printer
.
EnsurePrintWithKind
(
"test"
)
obj
:=
TestPrintType
{
"test object"
}
...
...
@@ -291,7 +291,7 @@ func TestCustomTypePrintingWithKind(t *testing.T) {
func
TestPrintHandlerError
(
t
*
testing
.
T
)
{
columns
:=
[]
string
{
"Data"
}
printer
:=
NewHumanReadablePrinter
(
PrintOptions
{})
printer
.
Handler
(
columns
,
ErrorPrintHandler
)
printer
.
Handler
(
columns
,
nil
,
ErrorPrintHandler
)
obj
:=
TestPrintType
{
"test object"
}
buffer
:=
&
bytes
.
Buffer
{}
err
:=
printer
.
PrintObj
(
&
obj
,
buffer
)
...
...
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