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 Tag type for Action #6
Conversation
// NewActionTag returns the tag for the action with the given name. | ||
func NewActionTag(actionName string) Tag { | ||
return ActionTag{name: actionName} | ||
} |
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.
Do you want to add a ParseActionTag method ? You don't need to, it's only needed if you don't want to type assert the result of ParseTag("someaction-...")
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.
Not at this time; 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.
Actually I did end up implementing this; thanks!
Updated, PTAL |
name string | ||
} | ||
|
||
func (t ActionTag) String() string { return t.Kind() + "-" + t.Id() } |
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.
It is nice if all public methods have a comment for godocs. Something like "String returns an ActionTag as a string type" or "human readable" or what ever the intent it.
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.
Will do.
LGTM I just had one optional / trivial comment. Also as someone completely unfamiliar with this code I found this very readable and easy to understand, including the tests. Nice job. |
Thanks @wwitzel3 I'll make those changes and then merge. |
PTAL