Closed
Description
Multi-line comments separated with newlines cause conflicts with goimports
.
Given:
package proc
import (
"github.com/a/b"
"github.com/local/foo"
// A multi-line comment explaining what this dependency
// is used for or what it initializes.
_ "github.com/client/auth"
)
sections:
- Standard
- Default
- Prefix(github.com/local)
The result is:
package proc
import (
"github.com/a/b"
// A multi-line comment explaining what this dependency
// is used for or what it initializes.
_ "github.com/client/auth"
"github.com/local/foo"
)
But goimports
will format it as:
package proc
import (
"github.com/a/b"
// A multi-line comment explaining what this dependency
// is used for or what it initializes.
_ "github.com/client/auth"
"github.com/local/foo"
)
This means that the two cannot be used together, e.g. with golangci-lint.