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

Passing struct to new functions #503

Conversation

likecodingloveproblems
Copy link
Contributor

@likecodingloveproblems likecodingloveproblems commented Mar 28, 2024

Ticket(s)

Closes #208.

Description

This PR revamps the constructor functions by passing structs into them and receiving pointers (mostly) back.

Related PRs

N/A

Development Checklist

  • I have added a descriptive title to this PR.
  • I have squashed related commits together.
  • I have rebased my branch on top of the latest main branch.
  • I have performed a self-review of my own code.
  • I have commented on my code, particularly in hard-to-understand areas.
  • I have added docstring(s) to my code.
  • I have made corresponding changes to the documentation (docs).
  • I have updated docs using make gen-docs command.
  • I have added tests for my changes.
  • I have signed all the commits.

Legal Checklist

Copy link

⚠️ This PR contains unsigned commits. To get your PR merged, please sign those commits (git rebase --exec 'git commit -S --amend --no-edit -n' @{upstream}) and force push them to this branch (git push --force-with-lease).

If you're new to commit signing, there are different ways to set it up:

Sign commits with gpg

Follow the steps below to set up commit signing with gpg:

  1. Generate a GPG key
  2. Add the GPG key to your GitHub account
  3. Configure git to use your GPG key for commit signing
Sign commits with ssh-agent

Follow the steps below to set up commit signing with ssh-agent:

  1. Generate an SSH key and add it to ssh-agent
  2. Add the SSH key to your GitHub account
  3. Configure git to use your SSH key for commit signing
Sign commits with 1Password

You can also sign commits using 1Password, which lets you sign commits with biometrics without the signing key leaving the local 1Password process.

Learn how to use 1Password to sign your commits.

Watch the demo

Copy link
Member

@mostafa mostafa left a comment

Choose a reason for hiding this comment

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

Hey @likecodingloveproblems,

This is almost perfect! 👏 👌 Please address the comments, sign the commits and update the description. 🙏

@mostafa mostafa force-pushed the passing-struct-to-new-functions branch from b884aa5 to 958b995 Compare April 6, 2024 16:16
@mostafa mostafa force-pushed the passing-struct-to-new-functions branch from c455a9a to 0a23f48 Compare April 9, 2024 19:47
Copy link
Member

@mostafa mostafa left a comment

Choose a reason for hiding this comment

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

Hey @likecodingloveproblems,

Thanks for your contribution! 🎉 I updated the description, signed the commits on your behalf and merged the latest changes from the main branch, while resolving conflicts. This PR was a blocker to many other tasks and there were only minor issues, so I fixed the issues myself, so I can merge it sooner. You really did a great job, which I am really grateful for. 🙏

@mostafa mostafa merged commit cf2b43d into gatewayd-io:main Apr 9, 2024
4 checks passed
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.

Pass struct to NewXXX functions for configuration, instead of individual parameters
3 participants