Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix staticcheck #141

Merged
merged 1 commit into from
May 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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