Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: #2888 sort import modules #2922

Closed
wants to merge 1 commit into from
Closed

fix: #2888 sort import modules #2922

wants to merge 1 commit into from

Conversation

morya
Copy link
Contributor

@morya morya commented Dec 4, 2024

🅰 Please add the issue ID after "Fixes #"

Fixes #2888

@pull-request-size pull-request-size bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Dec 4, 2024
Copy link

Whoa! Easy there, Partner!

This PR is too big. Please break it up into smaller PRs.

@mo3et
Copy link
Member

mo3et commented Dec 4, 2024

I suggest use goimports solve this problem.

Because the issue is from no category pkg to categoried. Use this tools is no good for maintain. But this issue need to be solve.

Plz use goimports.

@morya
Copy link
Contributor Author

morya commented Dec 4, 2024

already discussed with @Whyyyyy , he agreed this, so, should I switch back to goimports?

@morya
Copy link
Contributor Author

morya commented Dec 4, 2024

already discussed with @Whyyyyy , he agreed this, so, should I switch back to goimports?

goimports won't merge all same kind imports into one group,

import (
	"context"
	"fmt"
	"github.com/openimsdk/open-im-server/v3/pkg/common/config"
	"github.com/openimsdk/tools/utils/datautil"
	"github.com/openimsdk/tools/utils/network"
	"net"
	"net/http"
	"os"
	"os/signal"
	"strconv"
	"syscall"
	"time"

	kdisc "github.com/openimsdk/open-im-server/v3/pkg/common/discoveryregister"
	"github.com/openimsdk/open-im-server/v3/pkg/common/prommetrics"
	"github.com/openimsdk/tools/discovery"
	"github.com/openimsdk/tools/errs"
	"github.com/openimsdk/tools/log"
	"github.com/openimsdk/tools/system/program"
)

become

import (
	"context"
	"fmt"



	"net"
	"net/http"
	"os"
	"os/signal"
	"strconv"
	"syscall"
	"time"

	// separated group
	"github.com/openimsdk/open-im-server/v3/pkg/common/config"
	"github.com/openimsdk/tools/utils/datautil"
	"github.com/openimsdk/tools/utils/network"

	kdisc "github.com/openimsdk/open-im-server/v3/pkg/common/discoveryregister"
	"github.com/openimsdk/open-im-server/v3/pkg/common/prommetrics"
	"github.com/openimsdk/tools/discovery"
	"github.com/openimsdk/tools/errs"
	"github.com/openimsdk/tools/log"
	"github.com/openimsdk/tools/system/program"
)

@mo3et
Copy link
Member

mo3et commented Dec 4, 2024

already discussed with @Whyyyyy , he agreed this, so, should I switch back to goimports?

I talk the reason in before reply. Use CLI tools is no good to the maintain.

I think just need spilt the local module and third module that is fine.

@gouboyun gouboyun closed this by deleting the head repository Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] module imports are not sorted
4 participants