Skip to content

Commit

Permalink
staticheck fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
corylanou committed Feb 1, 2024
1 parent 1dca983 commit cba379c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
13 changes: 13 additions & 0 deletions cmd/hype/cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,16 @@ func New(root string) *App {
Cmd: cleo.Cmd{
Name: "marked",
Aliases: []string{"m", "md"},
Desc: "outputs for the Marked app (https://marked2app.com/)",
},
Parser: p,
}

e := &Export{

Check failure on line 124 in cmd/hype/cli/cli.go

View workflow job for this annotation

GitHub Actions / 1.21.x ubuntu-latest

undefined: Export
Cmd: cleo.Cmd{
Name: "export",
Aliases: []string{"export", "e"},
Desc: "export the document to a different format (markdown,json,html,etc...)",
},
Parser: p,
}
Expand All @@ -124,6 +134,7 @@ func New(root string) *App {
Cmd: cleo.Cmd{
Name: "preview",
Aliases: []string{"p"},
Desc: "outputs HTML for previwing document in a browser",
},
Parser: p,
}
Expand All @@ -132,6 +143,7 @@ func New(root string) *App {
Cmd: cleo.Cmd{
Name: "slides",
Aliases: []string{"s"},
Desc: "outputs slide format for presentation",
},
Parser: p,
}
Expand All @@ -144,6 +156,7 @@ func New(root string) *App {
"marked": m,
"preview": mp,
"slides": sl,
"export": e,
},
},
Parser: p,
Expand Down
1 change: 0 additions & 1 deletion cmd/hype/cli/toc.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ func (cmd *TOC) Main(ctx context.Context, pwd string, args []string) error {

if len(args) > 0 {
path = args[0]
args = args[1:]
}

if cmd.FS == nil {
Expand Down
4 changes: 0 additions & 4 deletions slides/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@ package slides
import (
"context"
"embed"
_ "embed"
"fmt"
"html/template"
"net/http"
"os"
"sync"
"time"

"github.com/gopherguides/hype"
Expand Down Expand Up @@ -43,8 +41,6 @@ type App struct {
PWD string
Parser *hype.Parser // If nil, a default parser is used.

mux *http.ServeMux
once sync.Once
}

func (a *App) ServeHTTP(w http.ResponseWriter, r *http.Request) {
Expand Down

0 comments on commit cba379c

Please sign in to comment.