Skip to content

Commit

Permalink
Merge pull request #31 from noborus/fix-usage
Browse files Browse the repository at this point in the history
Fix usage
  • Loading branch information
noborus authored Feb 28, 2024
2 parents ba317bc + f550a9d commit 63c698e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ jobs:

steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install Go
if: success()
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
go-version: stable

- name: Run tests
run: go test
3 changes: 2 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func main() {

// rootCmd represents the base command when called without any subcommands
var rootCmd = &cobra.Command{
Use: "mdviewer fileName.md",
Use: "mdviewer [flags] [FILE...]",
Short: "markdown viewer",
Version: fmt.Sprintf("%s (rev: %s)", Version, Revision),
Long: `markdown viewer.
Expand Down Expand Up @@ -58,4 +58,5 @@ func Execute() {
func init() {
cobra.OnInitialize()
rootCmd.PersistentFlags().BoolVarP(&only, "only", "o", false, "markdown render only")
rootCmd.DisableFlagsInUseLine = true
}

0 comments on commit 63c698e

Please sign in to comment.