Skip to content

x/tools/cmd/goimports: allow multiple -local flags #19188

@gregory-m

Description

@gregory-m

My company use flowing imports schema:

import (
    "some-std-lib"
    "other-std-lib"

    "github.com/some/dependency"
    "github.com/some/other-dependency"

    "mycompany.com/foo/bar"
    "mycompany.com/foo/baz"
)

goimports perfectly supports such imports schema by using -local flag.

But our company acquire some other company and they code also become local to us, e.g. we want to use flowing imports schema:

import (
    "some-std-lib"
    "other-std-lib"

    "github.com/some/dependency"
    "github.com/some/other-dependency"

    "mycompany.com/foo/bar"
    "mycompany.com/foo/baz"
    "othercompany.com/foo/bar"
)

Can we add multiple -local flags support to goimports?
If no objections I will create CL.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions