Skip to content

Commit

Permalink
fixed some lint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianrudnik committed Apr 5, 2019
1 parent 5b95b8a commit 0ba4607
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Tool that helps working with URIs on the command line, processing parts or prepa
[![license](https://img.shields.io/github/license/adrianrudnik/uritool.svg)](https://lab.klonmaschine.de/adrian.rudnik/uritool/blob/develop/LICENSE)
[![pipeline status](https://lab.klonmaschine.de/adrian.rudnik/uritool/badges/develop/pipeline.svg)](https://lab.klonmaschine.de/adrian.rudnik/uritool/commits/develop)
[![coverage report](https://lab.klonmaschine.de/adrian.rudnik/uritool/badges/develop/coverage.svg)](https://lab.klonmaschine.de/adrian.rudnik/uritool/commits/develop)
[![go report card](https://goreportcard.com/badge/github.com/adrianrudnik/uritool)](https://goreportcard.com/report/github.com/adrianrudnik/uritool)

## Installation

Expand Down
2 changes: 2 additions & 0 deletions cmd/cmdtest/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ import (
"github.com/spf13/cobra"
)

// ExecuteCommand executes and captures the output, returning the output and error
func ExecuteCommand(root *cobra.Command, args ...string) (output string, err error) {
_, output, err = ExecuteCommandC(root, args...)
return output, err
}

// ExecuteCommand executes and captures the output, returning the used command and output and error
func ExecuteCommandC(root *cobra.Command, args ...string) (c *cobra.Command, output string, err error) {
buf := new(bytes.Buffer)
root.SetOutput(buf)
Expand Down
12 changes: 2 additions & 10 deletions cmd/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,7 @@ var parseUriCmd = &cobra.Command{
return nil
}

if err := doJson(cmd, wrapped); err != nil {
return err
}

return nil
return doJson(cmd, wrapped)
},
}

Expand Down Expand Up @@ -112,10 +108,6 @@ var parseQueryCmd = &cobra.Command{
return nil
}

if err := doJson(cmd, parsed); err != nil {
return err
}

return nil
return doJson(cmd, parsed)
},
}

0 comments on commit 0ba4607

Please sign in to comment.