incu6us / goimports-reviser

Right imports sorting & code formatting tool (goimports alternative)
MIT License
607 stars 72 forks source link

How to remove empty line in company and project #88

Closed siskinc closed 2 years ago

siskinc commented 2 years ago

For example: the command:

goimports-reviser -company-prefixes my_company -rm-unused -output stdout  -imports-order std,company,project,general -format ${file}

code:

package main
import (
    "fmt"

    "my_company"

        "my_project"
)

expire

package main
import (
    "fmt"

    "my_company"
        "my_project"
)
incu6us commented 2 years ago

hi @siskinc If you need to combine dependencies of your project and company you can use similar prefix of your organisation/company using -company-prefixes.

Example: github.com/some_company/libs - your company dependency repo github.com/some_company/my_project - your project

goimports-reviser -company-prefixes "github.com/some_company" ...