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

remove redundant code #1202

Merged
merged 1 commit into from Jan 27, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 8 additions & 8 deletions uri.go
Expand Up @@ -70,14 +70,14 @@ type URI struct {
// CopyTo copies uri contents to dst.
func (u *URI) CopyTo(dst *URI) {
dst.Reset()
dst.pathOriginal = append(dst.pathOriginal[:0], u.pathOriginal...)
dst.scheme = append(dst.scheme[:0], u.scheme...)
dst.path = append(dst.path[:0], u.path...)
dst.queryString = append(dst.queryString[:0], u.queryString...)
dst.hash = append(dst.hash[:0], u.hash...)
dst.host = append(dst.host[:0], u.host...)
dst.username = append(dst.username[:0], u.username...)
dst.password = append(dst.password[:0], u.password...)
dst.pathOriginal = append(dst.pathOriginal, u.pathOriginal...)
dst.scheme = append(dst.scheme, u.scheme...)
dst.path = append(dst.path, u.path...)
dst.queryString = append(dst.queryString, u.queryString...)
dst.hash = append(dst.hash, u.hash...)
dst.host = append(dst.host, u.host...)
dst.username = append(dst.username, u.username...)
dst.password = append(dst.password, u.password...)

u.queryArgs.CopyTo(&dst.queryArgs)
dst.parsedQueryArgs = u.parsedQueryArgs
Expand Down