27 lines
627 B
Go
27 lines
627 B
Go
//go:build ignore
|
|
|
|
package main
|
|
|
|
import (
|
|
"os"
|
|
"strings"
|
|
)
|
|
|
|
func main() {
|
|
f := "internal/biz/advice_wx.go"
|
|
b, _ := os.ReadFile(f)
|
|
s := string(b)
|
|
|
|
// Fix: add missing closing brace for "if hasProjectInfo"
|
|
old := "\tif hasProjectInfo {\n\t\tmission = mission + projectDesc\n\t// 将销售人格拼接到 mission"
|
|
new := "\tif hasProjectInfo {\n\t\tmission = mission + projectDesc\n\t}\n\t// 将销售人格拼接到 mission"
|
|
|
|
if strings.Contains(s, old) {
|
|
s = strings.Replace(s, old, new, 1)
|
|
os.WriteFile(f, []byte(s), 0644)
|
|
println("done - fixed missing brace")
|
|
} else {
|
|
println("ERROR: block not found")
|
|
}
|
|
}
|