mirror of
https://github.com/beego/bee.git
synced 2024-12-26 16:40:50 +00:00
fix the log.LoggerInterface & v.Apis
This commit is contained in:
parent
ed219d7158
commit
284c7fd7a9
5
fix.go
5
fix.go
@ -118,6 +118,7 @@ var rules = []string{
|
||||
"swagger.Api", "swagger.API",
|
||||
"swagger.ApiRef", "swagger.APIRef",
|
||||
"toolbox.UrlMap", "toolbox.URLMap",
|
||||
"log.LoggerInterface", "log.Logger",
|
||||
}
|
||||
|
||||
func fixFile(file string) error {
|
||||
@ -131,6 +132,10 @@ func fixFile(file string) error {
|
||||
fixed = pareg.ReplaceAllString(fixed, "Input.Param(\"$2\")")
|
||||
pareg = regexp.MustCompile(`Input.Params\)`)
|
||||
fixed = pareg.ReplaceAllString(fixed, "Input.Params())")
|
||||
// replace the v.Apis in docs.go
|
||||
if strings.Contains("docs.go") {
|
||||
strings.Replace(fixed, "v.Apis", "v.APIs", -1)
|
||||
}
|
||||
err = os.Truncate(file, 0)
|
||||
if err != nil {
|
||||
return err
|
||||
|
Loading…
Reference in New Issue
Block a user