1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-22 12:27:02 +00:00

Embrace the weekend- Update to rc.3 | Read the HISTORY.md

This commit is contained in:
Makis Maropoulos
2016-06-24 01:34:49 +03:00
parent 4a446ac1e2
commit f83b532835
50 changed files with 142 additions and 3812 deletions

View File

@@ -8,8 +8,8 @@ import (
"strings"
"sync/atomic"
"github.com/iris-contrib/errors"
"github.com/kataras/cli"
"github.com/kataras/iris/errors"
"github.com/kataras/iris/utils"
)
@@ -71,10 +71,21 @@ func runAndWatch(flags cli.Flags) error {
if filepath.Ext(programPath) != goExt {
return errInvalidExt.Format(programPath)
}
// check if we have a path,change the workingdir and programpath
if lidx := strings.LastIndexByte(programPath, os.PathSeparator); lidx > 0 { // no /
workingDir = workingDir + utils.PathSeparator + programPath[0:lidx]
programPath = programPath[lidx+1:]
} else if lidx := strings.LastIndexByte(programPath, '/'); lidx > 0 { // no /
workingDir = workingDir + "/" + programPath[0:lidx]
programPath = programPath[lidx+1:]
}
executablePath = programPath[:len(programPath)-3]
if isWindows {
executablePath += ".exe"
}
}
// here(below), we don't return the error because the -help command doesn't help the user for these errors.