Skip to content

pprofhandler: use bytes.HasPrefix for consistency - #1543

Merged
erikdubbelboer merged 1 commit into
valyala:masterfrom
alexandear:pprof-bytes-hasprefix
Apr 26, 2023
Merged

erikdubbelboer merged 1 commit into
valyala:masterfrom
alexandear:pprof-bytes-hasprefix

Conversation

@alexandear

Copy link
Copy Markdown
Contributor

This PR replaces strings.HasPrefix with bytes.HasPrefix for consistency. Also, use switch instead of if-else chain.

@erikdubbelboer
erikdubbelboer merged commit 00c291b into valyala:master Apr 26, 2023
@erikdubbelboer

Copy link
Copy Markdown
Collaborator

Thanks! This also causes less garbage: https://go.dev/play/p/-UQvLvZqnKT

@alexandear
alexandear deleted the pprof-bytes-hasprefix branch April 26, 2023 08:55
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