-
-
Notifications
You must be signed in to change notification settings - Fork 59
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
Add implementation of binary string generator for Faker #72
Conversation
@bhatipradeep congrats for the first contribution, can you just describe what is the use case of this generator? |
Thanks @jaswdr . The most common usecase for students is to design testcases of various competitive programming problems. |
right, please check the Codacy report, there are some violations. |
binarystring.go
Outdated
} | ||
|
||
//BinaryNumberOfLength returns random binary string with given input length | ||
func (bn BinaryString) BinaryStringOfLength(l int) string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor change, please use BinaryString
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change function name ?
binarystring_test.go
Outdated
) | ||
|
||
//check if given string is binary or not | ||
func CheckIfBinaryString(binary_string string) bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this function is only used in the TestBinaryStringOfLength
and no other test should use it, can you move this code to the TestBinaryStringOfLength?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. It can be shifted to test itself for now.
@jaswdr updated code with changes. |
@bhatipradeep released in v1.6.0, congrats for your first merge 🎉 |
Description
Added a binary string generator for faker.
Are you trying to fix an existing issue?
No
Go Version
Go Tests