gofm 能否适应本地编码标准偏好?

Can gofmt accommodate local coding standard preferences?

我喜欢 gofmt 在 Go 编程中的作用。不过,我们宁愿以下内容:

func somefunc(
    a *sometype, // Explanation of a
    b int, // Explanation of b
    longName float64, // Explanation of longName
) {
...

可以这样格式化:

func somefunc(
    a        *sometype, // Explanation of a
    b        int,       // Explanation of b
    longName float64,   // Explanation of longName
) {
...

类似于结构的格式化方式,并与我们针对其他语言的编码标准保持一致。是否有任何条款可以满足像这样的本地偏好,或者这是 "not the way we do things around here"?我找不到对 gofmt 使用的模式的任何访问权限,所以我的猜测是 "no".

Can Go accommodate local coding standard preferences?

没有。你猜对了。

(制定标准的全部原因是要有一个标准,而不是每个 person/organization 一个标准。)