Skip to content
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(app): add SetEnforceUniqueUsernames to restrict allowed values #257

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jnelle
Copy link

@jnelle jnelle commented Nov 5, 2023

CLA

  • I have signed the Stream CLA (required).
  • The code changes follow best practices
  • Code changes are tested (add some information if not applicable)

Description of the pull request

Since I couldn't find the allowed values in the GO SDK docs, I decided to add the SetEnforceUniqueUsernames function, because it restricts the allowed values and shows the developer which values are allowed.

Signed-off-by: jnelle <602579@fom-net.de>

* Since I couldn't find the allowed values in the GO SDK docs, I decided
  to add this, because it restricts the allowed values and shows the
developer which values are allowed
@jnelle jnelle requested a review from yaziine as a code owner November 5, 2023 16:24
default:
result = "app"
}
return &result

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need to be a pointer? Because I believe that Go's "escape analysis" will put this in the heap instead of stack.

This beauty thing Go does to avoid dangling pointer—since variable should only exists inside the function—always bug my brain. 🤯

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, it doesn't have to be. Gonna change it later

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.

None yet

2 participants