-
-
Notifications
You must be signed in to change notification settings - Fork 147
fix slice tag bug AND add chinese name #141
Conversation
I don't see the previously committed code being merged into master, is there anything I need to do? |
Sorry, there's a linter issue. Not sure why, it's passed before merged to master, but it failed now. |
Can you help to fix the linter? |
I will deal with it as soon as possible and submit the code |
Through testing I found some problems with the code I wrote before and fixed them. Now it should be ready for merging, thanks! |
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.
Hey @qiangmzsx
So sorry for the late reply, I was so busy in the past few months, just had time to review your PR now.
I have a few comments, please re-review when you have time, thnx
faker.go
Outdated
} | ||
|
||
// fmt.Println("++TAGS:", tags, res) |
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.
can remove this?
faker_test.go
Outdated
@@ -1954,6 +2020,7 @@ func TestOneOfTag__BadInputsForInts(t *testing.T) { | |||
err := FakeData(&a) | |||
if err == nil { | |||
t.Fatal("expected error, but got no error") | |||
return |
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.
why need to return? Is there any issue?
Thanks for the review. I have made the changes and would appreciate your review again. |
Hey @qiangmzsx I think it's conflict, can you rebase your code from the master, and apply your changes? |
I'm very sorry! This was my problem, caused by not doing a pull of the latest code for a long time, and I have fixed it. Request another review. |
@@ -134,6 +137,15 @@ const ( | |||
//hyphen = "-" | |||
) | |||
|
|||
// PriorityTags define the priority order of the tag | |||
var PriorityTags = []string{ID, HyphenatedID, EmailTag, MacAddressTag, DomainNameTag, UserNameTag, URLTag, IPV4Tag, |
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.
remind me again, what are these priority tags used for?
@@ -653,7 +673,28 @@ func decodeTags(typ reflect.Type, i int) structTag { | |||
uni = true | |||
continue | |||
} | |||
res = append(res, tag) | |||
// res = append(res, tag) |
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.
please remove if not used anymore
Hey @qiangmzsx |
I'm online today, so feel free to communicate with me if you need anything. |
My email address is qiangmzsx@hotmail.com 。 |
fix bug
return:
but
return:
features