1
0
mirror of https://github.com/beego/bee.git synced 2024-11-29 11:41:28 +00:00
This commit is contained in:
astaxie 2016-01-11 15:21:54 +08:00
parent e674edac3e
commit c2bca2b114

2
fix.go
View File

@ -162,6 +162,8 @@ func fixFile(file string) error {
fixed = pareg.ReplaceAllString(fixed, "Input.Param(\"$2\")")
pareg = regexp.MustCompile(`(Input.Data\[\")(.*)(\"\])(\s)(=)(\s)(.*)`)
fixed = pareg.ReplaceAllString(fixed, "Input.SetData(\"$2\", $7)")
pareg = regexp.MustCompile(`(Input.Data\[\")(.*)(\"\])`)
fixed = pareg.ReplaceAllString(fixed, "Input.Data(\"$2\")")
// replace the v.Apis in docs.go
if strings.Contains(file, "docs.go") {
fixed = strings.Replace(fixed, "v.Apis", "v.APIs", -1)