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

package naming problem #148

Open
SchwarzSail opened this issue Dec 25, 2024 · 0 comments
Open

package naming problem #148

SchwarzSail opened this issue Dec 25, 2024 · 0 comments

Comments

@SchwarzSail
Copy link
Member

SchwarzSail commented Dec 25, 2024

  1. 目前项目的 package 存在命名模糊问题,出现例如:base,utils 等,给人一种好像不知道函数放哪就统一丢到 base 或者 utils 包中的感觉。这类包的作用应该是给上层 caller 提供清晰的 API 。
  2. pkg 下包作用域混杂。例如 base 包中集成了 cache,db,mq 等 client

总之,pkg 包的命名归类我认为有问题

可能改进的方法:

  • 对于 client 包,应该再继续细分成 rpc,db,cache 等
  • utils 包里面的功能应该再细分,比如encoding 之类的可以命名为 parse,表明这个 package 是用作一些数据格式间的转换
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant