-
Notifications
You must be signed in to change notification settings - Fork 96
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
refactor(idutils): rename GenerateExternalIDForDocument to GenerateExternalID #1713
base: main
Are you sure you want to change the base?
Conversation
|
@@ -51,8 +52,8 @@ func GenerateExternalIDForSettingsObject(c coordinate.Coordinate) (string, error | |||
|
|||
type ExternalIDGenerator func(coordinate.Coordinate) (string, error) | |||
|
|||
// GenerateExternalIDForDocument generates an external ID for a document configuration. It is under 50 characters long and uses at most only "a-z", "A-Z", "0-9" and "-". | |||
func GenerateExternalIDForDocument(c coordinate.Coordinate) (string, error) { | |||
// GenerateExternalID generates an external ID for a document configuration. It is under 50 characters long and uses at most only "a-z", "A-Z", "0-9" and "-". |
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.
// GenerateExternalID generates an external ID for a document configuration. It is under 50 characters long and uses at most only "a-z", "A-Z", "0-9" and "-". | |
// GenerateExternalID generates an external ID for a configuration. It is under 50 characters long and uses at most only "a-z", "A-Z", "0-9" and "-". |
@@ -51,8 +52,8 @@ func GenerateExternalIDForSettingsObject(c coordinate.Coordinate) (string, error | |||
|
|||
type ExternalIDGenerator func(coordinate.Coordinate) (string, error) | |||
|
|||
// GenerateExternalIDForDocument generates an external ID for a document configuration. It is under 50 characters long and uses at most only "a-z", "A-Z", "0-9" and "-". | |||
func GenerateExternalIDForDocument(c coordinate.Coordinate) (string, error) { | |||
// GenerateExternalID generates an external ID for a document configuration. It is under 50 characters long and uses at most only "a-z", "A-Z", "0-9" and "-". |
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.
Just an idea: As the function takes the coordinate, could it absorb the function above for settings and then provide the correct externalID after examining the config type?
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.
I like the idea, lets align at the daily :)
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.
Kind of like that as well, though we do increase cohesion 🤔
What this PR does / Why we need it:
As the
GenerateExternalIDForDocument
is being used also in other API than Documents, it was renamed toGenerateExternalID
Special notes for your reviewer:
Does this PR introduce a user-facing change?