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: change Hook(h Hook) to Hook(hooks ...Hook) #629

Merged
merged 2 commits into from
Dec 24, 2023

Conversation

Halimao
Copy link
Contributor

@Halimao Halimao commented Dec 24, 2023

This PR add support for setting multiple hooks at one time, without multiple times of deep copy (compare to call Hook() multi-times)

Also, func (l Logger) Hook(hooks ...Hook) Logger {} is compatible with func (l Logger) Hook(h Hook) Logger {}

@rs rs merged commit 3e8ae07 into rs:master Dec 24, 2023
madkins23 pushed a commit to madkins23/zerolog that referenced this pull request Mar 2, 2024
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.

2 participants