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

关于tool包中http工具 #1

Closed
SnowWarri0r opened this issue Nov 3, 2021 · 2 comments
Closed

关于tool包中http工具 #1

SnowWarri0r opened this issue Nov 3, 2021 · 2 comments

Comments

@SnowWarri0r
Copy link

结构体中多处使用了map[string]interface{}建议根据具体情况把interface{}改为string或者[]string

@SnowWarri0r
Copy link
Author

除此之外,还有命名不清晰的问题,在结构体定义上没啥问题,但来到函数内部就出现极大的混乱

@Mmx233
Copy link
Owner

Mmx233 commented Nov 3, 2021

使用interface是为了方便传值,没必要使用过于原生的类型,以简化调用时的代码。底层函数的命名都较为规范,只有快捷函数使用了大量单字符变量,但是可以通过查看底层函数返回类型很快判断出用途,且看懂一个就看懂全部,查看源码debug的时候快捷函数内容也不会影响结果,逻辑都在底层函数中,所以我认为怎么快怎么来。

@Mmx233 Mmx233 closed this as completed Nov 11, 2021
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