mirror of
https://github.com/astaxie/beego.git
synced 2024-11-25 14:50:55 +00:00
Fix formatting with gofmt
This commit is contained in:
parent
2c5ef8ccc8
commit
adbae18e8c
@ -39,9 +39,9 @@ const (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
// ErrAbort custom error when user stop request handler manually.
|
// ErrAbort custom error when user stop request handler manually.
|
||||||
ErrAbort = errors.New("User stop run")
|
ErrAbort = errors.New("User stop run")
|
||||||
// GlobalControllerRouter store comments with controller. pkgpath+controller:comments
|
// GlobalControllerRouter store comments with controller. pkgpath+controller:comments
|
||||||
GlobalControllerRouter = make(map[string][]ControllerComments)
|
GlobalControllerRouter = make(map[string][]ControllerComments)
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -284,7 +284,7 @@ func (c *Controller) URLFor(endpoint string, values ...interface{}) string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
if endpoint[0] == '.' {
|
if endpoint[0] == '.' {
|
||||||
return URLFor(reflect.Indirect(reflect.ValueOf(c.AppController)).Type().Name() + endpoint, values...)
|
return URLFor(reflect.Indirect(reflect.ValueOf(c.AppController)).Type().Name()+endpoint, values...)
|
||||||
}
|
}
|
||||||
return URLFor(endpoint, values...)
|
return URLFor(endpoint, values...)
|
||||||
}
|
}
|
||||||
@ -490,7 +490,7 @@ func (c *Controller) SaveToFile(fromfile, tofile string) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
defer file.Close()
|
defer file.Close()
|
||||||
f, err := os.OpenFile(tofile, os.O_WRONLY | os.O_CREATE | os.O_TRUNC, 0666)
|
f, err := os.OpenFile(tofile, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0666)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -7,8 +7,8 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"os"
|
"os"
|
||||||
"testing"
|
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
var currentWorkDir, _ = os.Getwd()
|
var currentWorkDir, _ = os.Getwd()
|
||||||
|
Loading…
Reference in New Issue
Block a user