Skip to content

Commit

Permalink
Minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
xyproto committed Jun 25, 2024
1 parent 7bc138a commit b5fa89a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 1 addition & 3 deletions engine/help.go
Original file line number Diff line number Diff line change
Expand Up @@ -538,9 +538,7 @@ func generateUsageFunction(ac *Config) func() {
return func() {
fmt.Println("\n" + ac.versionString + "\n\n" + ac.description)

var quicExample string
var quicUsageOrMessage string
var quicFinalMessage string
var quicExample, quicUsageOrMessage, quicFinalMessage string

// Prepare and/or output a message, depending on if QUIC support is compiled in or not
if quicEnabled {
Expand Down
6 changes: 3 additions & 3 deletions engine/luahandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"sync"

"github.com/didip/tollbooth"
log "github.com/sirupsen/logrus"
"github.com/sirupsen/logrus"
"github.com/xyproto/algernon/themes"
lua "github.com/xyproto/gopher-lua"
)
Expand All @@ -33,7 +33,7 @@ func (ac *Config) LoadLuaHandlerFunctions(L *lua.LState, filename string, mux *h
L.Push(handleFunc)
if err := L.PCall(0, lua.MultRet, nil); err != nil {
// Non-fatal error
log.Error("Handler for "+handlePath+" failed:", err)
logrus.Error("Handler for "+handlePath+" failed:", err)
}

// Then exit after the first request, if specified
Expand All @@ -59,7 +59,7 @@ func (ac *Config) LoadLuaHandlerFunctions(L *lua.LState, filename string, mux *h
handlePath := L.ToString(1) // serve as (ie. "/")
rootdir := L.ToString(2) // filesystem directory (ie. "./public")
if handlePath == "" || rootdir == "" {
log.Errorf("servedir needs an URL path to serve, ie. %q and a directory releative to %q, ie. %q", "/", filepath.Dir(filename), "./public")
logrus.Errorf("servedir needs an URL path to serve, ie. %q and a directory releative to %q, ie. %q", "/", filepath.Dir(filename), "./public")
return 0
}
rootdir = filepath.Join(filepath.Dir(filename), rootdir)
Expand Down

0 comments on commit b5fa89a

Please sign in to comment.