提交 b3d7cacf 编写于 作者: X xxx

fix:return code

上级 f6a14f39
......@@ -12,18 +12,16 @@ func waGenerateWat(code string) string {
wat, err := api.BuildFile(api.DefaultConfig(), "hello.wa", code)
if err != nil {
return err.Error()
} else {
return string(wat)
}
return string(wat)
}
func waFormatCode(code string) string {
code, err := api.FormatCode("hello.wa", code)
newCode, err := api.FormatCode("hello.wa", code)
if err != nil {
return err.Error()
} else {
return code
}
return newCode
}
func main() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册