mirror of
https://github.com/kevin-DL/revel-cmd.git
synced 2026-01-23 15:31:26 +00:00
Spaces to tabs (gofmt) files
This commit is contained in:
12
revel/run.go
12
revel/run.go
@@ -89,12 +89,12 @@ func parseRunArgs(args []string) *RunArgs {
|
||||
// 1. revel run [import-path]
|
||||
// 2. revel run [port]
|
||||
// 3. revel run [run-mode]
|
||||
_, err := build.Import(args[0], "", build.FindOnly);
|
||||
if err!=nil {
|
||||
revel.WARN.Printf("Unable to run using an import path, assuming import path is working directory %s %s",args[0],err.Error())
|
||||
}
|
||||
println("Trying to build with",args[0], err)
|
||||
if err == nil {
|
||||
_, err := build.Import(args[0], "", build.FindOnly)
|
||||
if err != nil {
|
||||
revel.WARN.Printf("Unable to run using an import path, assuming import path is working directory %s %s", args[0], err.Error())
|
||||
}
|
||||
println("Trying to build with", args[0], err)
|
||||
if err == nil {
|
||||
// 1st arg is the import path
|
||||
inputArgs.ImportPath = args[0]
|
||||
} else if port, err := strconv.Atoi(args[0]); err == nil {
|
||||
|
||||
@@ -29,7 +29,6 @@ func init() {
|
||||
revel.ActionInvoker, // Invoke the action.
|
||||
}
|
||||
|
||||
|
||||
// register startup functions with OnAppStart
|
||||
// revel.DevMode and revel.RunMode only work inside of OnAppStart. See Example Startup Script
|
||||
// ( order dependent )
|
||||
@@ -45,7 +44,7 @@ func init() {
|
||||
var HeaderFilter = func(c *revel.Controller, fc []revel.Filter) {
|
||||
c.Response.SetHttpHeader("X-Frame-Options", "SAMEORIGIN")
|
||||
c.Response.SetHttpHeader("X-XSS-Protection", "1; mode=block")
|
||||
c.Response.SetHttpHeader( "X-Content-Type-Options", "nosniff")
|
||||
c.Response.SetHttpHeader("X-Content-Type-Options", "nosniff")
|
||||
|
||||
fc[0](c, fc[1:]) // Execute the next filter stage.
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user