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

api 内部结构不够友好 #26

Open
yinhylin opened this issue Jan 27, 2022 · 1 comment
Open

api 内部结构不够友好 #26

yinhylin opened this issue Jan 27, 2022 · 1 comment

Comments

@yinhylin
Copy link

api内部采用的 module/service|job/v1/ 的结构,导致 import 的时候出现一堆需要 alias 的问题,不够友好。为什么不是采用:service|job/module 的形式呢?这样,import 的时候就无需大量 alias 了。

另外,v1 目录也显得有些多余,在我看来, service|job/module 本身表示 v1 版本,而 service|job/module/v2 这样的表示 v1 以外的版本,不是更符合 go 开发的惯例么?非要这样设计的目的是什么?

另外,从模块版本控制上来看, v1、v2 内部的 pacakge name 采用 module,而不是 v1,v2 这样的 package name 不是更好么?在import 时, 从 v1 切换到 v2,只是由 service/module 变作 service/module/v2 这样的结构,其它都无需更改。

@gopkg-dev
Copy link

我觉得很有道理噢

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

2 participants