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

Feat/#issue284 #325

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

ekumamatthew
Copy link

refactor: replace WithCorsMiddleware by WithGlobalMiddleware

Copy link
Member

@EwenQuim EwenQuim left a comment

Choose a reason for hiding this comment

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

Thanks for your work 🙏🏼

Please write a tests that shows that it works. You can also update the tests that are about the cors middleware.

And please update the PR title to something meaningful lol.

server.go Outdated
}
}

// WithCorsMiddleware is deprecated: Use WithGlobalMiddleware instead.
Copy link
Member

Choose a reason for hiding this comment

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

Please use the same syntax than all other deprecated notices, the one understood by Go editors and godoc : skip line then write Deprecated: xxx.

Also, please reference [WithGlobalMiddlewares] with brackets so it can be recognized by other Go tools like Godoc :)

}
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why such a change?

You could add a commit if it's about formatting files

server.go Outdated
Comment on lines 46 to 47
// For example, it allows OPTIONS /foo even if it is not declared (only GET /foo is declared).
corsMiddleware func(http.Handler) http.Handler
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do you still need this then?

Copy link
Member

Choose a reason for hiding this comment

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

True, as it is not exposed, we can remove it, no need for deprecation notice!

@ekumamatthew
Copy link
Author

fuego

test output

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.

3 participants