From c2bca2b11487ff2c25363298ab1b82a8ae56e59b Mon Sep 17 00:00:00 2001 From: astaxie Date: Mon, 11 Jan 2016 15:21:54 +0800 Subject: [PATCH] fix data --- fix.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fix.go b/fix.go index 6d024ca..897cabb 100644 --- a/fix.go +++ b/fix.go @@ -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)