sonatype-nexus-community / nancy

A tool to check for vulnerabilities in your Golang dependencies, powered by Sonatype OSS Index
Apache License 2.0
564 stars 74 forks source link

Show usage when a command is invalid #132

Closed MichelKazi closed 4 years ago

MichelKazi commented 4 years ago

Switched the if..else for the os.Args stuff in main.go block into a switch case statement.

This pull request makes the following changes:

It relates to the following issue #s:

cc @bhamail / @DarthHater

sonatypecla[bot] commented 4 years ago

Thanks for the contribution! Before we can merge this, we need @MichelKazi to sign the Sonatype Contributor License Agreement.

MichelKazi commented 4 years ago

This is currently not possible, because Nancy accepts go.sum or gopkg.lock as named parameters. We have no easy way of distinguishing between those and a invalid command. A potential solution is to add a flag for a filepath