Commit 61f0e7f7 authored by Janos Guljas's avatar Janos Guljas

better solution for 'unused' lint errors

parent cac4ca7f
...@@ -9,13 +9,18 @@ type ( ...@@ -9,13 +9,18 @@ type (
var ( var (
NewCommand = newCommand NewCommand = newCommand
// avoid unused lint errors until the functions are used
_ = WithCfgFile
_ = WithInput
_ = WithErrorOutput
) )
// func WithCfgFile(f string) func(c *Command) { func WithCfgFile(f string) func(c *Command) {
// return func(c *Command) { return func(c *Command) {
// c.cfgFile = f c.cfgFile = f
// } }
// } }
func WithHomeDir(dir string) func(c *Command) { func WithHomeDir(dir string) func(c *Command) {
return func(c *Command) { return func(c *Command) {
...@@ -29,11 +34,11 @@ func WithArgs(a ...string) func(c *Command) { ...@@ -29,11 +34,11 @@ func WithArgs(a ...string) func(c *Command) {
} }
} }
// func WithInput(r io.Reader) func(c *Command) { func WithInput(r io.Reader) func(c *Command) {
// return func(c *Command) { return func(c *Command) {
// c.root.SetIn(r) c.root.SetIn(r)
// } }
// } }
func WithOutput(w io.Writer) func(c *Command) { func WithOutput(w io.Writer) func(c *Command) {
return func(c *Command) { return func(c *Command) {
...@@ -41,8 +46,8 @@ func WithOutput(w io.Writer) func(c *Command) { ...@@ -41,8 +46,8 @@ func WithOutput(w io.Writer) func(c *Command) {
} }
} }
// func WithErrorOutput(w io.Writer) func(c *Command) { func WithErrorOutput(w io.Writer) func(c *Command) {
// return func(c *Command) { return func(c *Command) {
// c.root.SetErr(w) c.root.SetErr(w)
// } }
// } }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment