Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mybee
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vicotor
mybee
Commits
61f0e7f7
Commit
61f0e7f7
authored
Jan 21, 2020
by
Janos Guljas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
better solution for 'unused' lint errors
parent
cac4ca7f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
15 deletions
+20
-15
export_test.go
cmd/bee/cmd/export_test.go
+20
-15
No files found.
cmd/bee/cmd/export_test.go
View file @
61f0e7f7
...
...
@@ -9,13 +9,18 @@ type (
var
(
NewCommand
=
newCommand
// avoid unused lint errors until the functions are used
_
=
WithCfgFile
_
=
WithInput
_
=
WithErrorOutput
)
//
func WithCfgFile(f string) func(c *Command) {
//
return func(c *Command) {
//
c.cfgFile = f
//
}
//
}
func
WithCfgFile
(
f
string
)
func
(
c
*
Command
)
{
return
func
(
c
*
Command
)
{
c
.
cfgFile
=
f
}
}
func
WithHomeDir
(
dir
string
)
func
(
c
*
Command
)
{
return
func
(
c
*
Command
)
{
...
...
@@ -29,11 +34,11 @@ func WithArgs(a ...string) func(c *Command) {
}
}
//
func WithInput(r io.Reader) func(c *Command) {
//
return func(c *Command) {
//
c.root.SetIn(r)
//
}
//
}
func
WithInput
(
r
io
.
Reader
)
func
(
c
*
Command
)
{
return
func
(
c
*
Command
)
{
c
.
root
.
SetIn
(
r
)
}
}
func
WithOutput
(
w
io
.
Writer
)
func
(
c
*
Command
)
{
return
func
(
c
*
Command
)
{
...
...
@@ -41,8 +46,8 @@ func WithOutput(w io.Writer) func(c *Command) {
}
}
//
func WithErrorOutput(w io.Writer) func(c *Command) {
//
return func(c *Command) {
//
c.root.SetErr(w)
//
}
//
}
func
WithErrorOutput
(
w
io
.
Writer
)
func
(
c
*
Command
)
{
return
func
(
c
*
Command
)
{
c
.
root
.
SetErr
(
w
)
}
}
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