提交 6a13e3fb 编写于 作者: chai2010's avatar chai2010

完善零参数函数格式化

上级 8f074503
...@@ -386,7 +386,9 @@ func (p *printer) parameters(fields *ast.FieldList) { ...@@ -386,7 +386,9 @@ func (p *printer) parameters(fields *ast.FieldList) {
func (p *printer) signature(params, result *ast.FieldList) { func (p *printer) signature(params, result *ast.FieldList) {
if params != nil { if params != nil {
p.parameters(params) if params.Opening != token.NoPos {
p.parameters(params)
}
} else { } else {
p.print(token.LPAREN, token.RPAREN) p.print(token.LPAREN, token.RPAREN)
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册