我有一些代码看起来像Id string // uniq bid req id provided by the exchangeFields []interface{} // array of field objectsUser interface{} // user objDevice interface{}我知道这个align-regexp功能,我用它来调整我的评论。这将输出类似Id string // uniq bid req id provided by the exchangeFields []interface{} // array of field objectsUser interface{} // user objDevice interface{}但是,我也希望正确对齐类型。我试图弄清楚我将如何使用align-regexp才能实现这一目标。不幸的是,我缺乏正则表达式技能。我希望输出看起来像Id string // uniq bid req id provided by the exchangeFields []interface{} // array of field objectsUser interface{} // user objDevice interface{}我不介意这是两个单独的函数调用,因为我可以编写一个可以封装它们的函数。另外,我不在乎解决方案是否最终使用align-regexp. 到目前为止,这就是我一直用于此类事情的方法。
- 1 回答
- 0 关注
- 174 浏览
添加回答
举报
0/150
提交
取消