8000 重载了getRandomElement 方法 by changhe626 · Pull Request #54 · yindz/common-random · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

重载了getRandomElement 方法 #54

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

Merged
merged 1 commit into from
May 7, 2022
Merged

Conversation

changhe626
Copy link
Contributor
@changhe626 changhe626 commented May 7, 2022

重载了getRandomElement 方法, 增加了更加通用的获取多个元素的方法, 同时修改了获取单个元素的getRandomElemnt和获取字符串getRandomString的方法.

一点建议: 相同的逻辑可以抽取公用方法, 方便以后的维护, 例如此方法, 同时被获取一个元素和获取字符串的方法调用, 涉及到方法修改时候, 只需要修改通用的方法即可.

本地已测试过.
又来个老板打工了.
2022.5.6 11:45:30

…nt和获取字符串getRandomString的方法

本地已测试过.
又来个老板打工了. 2022.5.6 11:45:30
@changhe626
Copy link
Contributor Author

下次有空, 再把单元测试弄上.

@yindz yindz merged commit 9e1937b into yindz:master May 7, 2022
@yindz
Copy link
Owner
yindz commented May 7, 2022

谢谢。
这里面一些工具类其实是写得很仓促的,我也没有在这方面花过多时间。在此感谢您的努力和帮助。
因为实际上可能仅仅是在开发测试阶段短暂使用它,而我对这个工具包的期待是:以最小的代价去生成伪随机数据,使它们能够尽量接近于现实场景中的真实数据。也不曾想过做成一个【大而全】的工具。
后续我的计划主要是:
(1)根据现实情况去不断修订现有的resource内容
(2)增加一些新的数据类型
任何帮助或建议,我将不胜感激。Any help or suggestion would be appreciated.

@changhe626 changhe626 deleted the patch-1 branch May 9, 2022 01:11
@changhe626
Copy link
Contributor Author

谢谢。
这里面一些工具类其实是写得很仓促的,我也没有在这方面花过多时间。在此感谢您的努力和帮助。
因为实际上可能仅仅是在开发测试阶段短暂使用它,而我对这个工具包的期待是:以最小的代价去生成伪随机数据,使它们能够尽量接近于现实场景中的真实数据。也不曾想过做成一个【大而全】的工具。
后续我的计划主要是:
(1)根据现实情况去不断修订现有的resource内容
(2)增加一些新的数据类型
任何帮助或建议,我将不胜感激。Any help or suggestion would be appreciated.

分享一篇文章给你(其实是就是我写的) , https://changhe.blog.csdn.net/article/details/123042895

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

Successfully merging this pull request may close these issues.

2 participants
0