mirror of
https://github.com/kevin-DL/revel-cmd.git
synced 2026-01-11 18:54:31 +00:00
More linting
This commit is contained in:
@@ -6,7 +6,6 @@ package harness
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
@@ -19,6 +18,16 @@ import (
|
||||
"github.com/revel/cmd/utils"
|
||||
)
|
||||
|
||||
// Error is used for constant errors.
|
||||
type Error string
|
||||
|
||||
// Error implements the error interface.
|
||||
func (e Error) Error() string {
|
||||
return string(e)
|
||||
}
|
||||
|
||||
const ErrTimedOut Error = "app timed out"
|
||||
|
||||
// App contains the configuration for running a Revel app. (Not for the app itself)
|
||||
// Its only purpose is constructing the command to execute.
|
||||
type App struct {
|
||||
@@ -83,7 +92,8 @@ func (cmd AppCmd) Start(c *model.CommandConfig) error {
|
||||
println("Revel proxy is listening, point your browser to :", c.Run.Port)
|
||||
utils.Logger.Error("Killing revel server process did not respond after wait timeout.", "processid", cmd.Process.Pid)
|
||||
cmd.Kill()
|
||||
return errors.New("revel/harness: app timed out")
|
||||
|
||||
return fmt.Errorf("revel/harness: %w", ErrTimedOut)
|
||||
|
||||
case <-listeningWriter.notifyReady:
|
||||
println("Revel proxy is listening, point your browser to :", c.Run.Port)
|
||||
|
||||
Reference in New Issue
Block a user