Skip to content

Commit

Permalink
Merge pull request #141 from multiformats/fix-staticcheck
Browse files Browse the repository at this point in the history
fix staticcheck
  • Loading branch information
marten-seemann authored May 5, 2021
2 parents 75ae368 + adb16e1 commit f5a3c5f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 0 additions & 4 deletions multihash/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ Options:
var opts *mhopts.Options
var checkRaw string
var checkMh mh.Multihash
var inputFilename string
var quiet bool
var help bool

Expand Down Expand Up @@ -70,13 +69,10 @@ func getInput() (io.ReadCloser, error) {

switch {
case len(args) < 1:
inputFilename = "-"
return os.Stdin, nil
case args[0] == "-":
inputFilename = "-"
return os.Stdin, nil
default:
inputFilename = args[0]
f, err := os.Open(args[0])
if err != nil {
return nil, fmt.Errorf("failed to open '%s': %s", args[0], err)
Expand Down
2 changes: 1 addition & 1 deletion opts/opts.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func (o *Options) ParseError() error {
var found bool
o.AlgorithmCode, found = mh.Names[o.Algorithm]
if !found {
return fmt.Errorf("algorithm '%s' not found (lib error, pls report).", o.Algorithm)
return fmt.Errorf("algorithm '%s' not found (lib error, pls report)", o.Algorithm)
}

if o.Length >= 0 {
Expand Down

0 comments on commit f5a3c5f

Please sign in to comment.