[go: up one dir, main page]

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

caddyhttp: Address some Go 1.20 features #6252

Merged
merged 10 commits into from
Apr 24, 2024
Merged

Conversation

mholt
Copy link
Member
@mholt mholt commented Apr 19, 2024

See #5288.

@mholt mholt added this to the v2.8.0 milestone Apr 19, 2024
@mholt mholt mentioned this pull request Apr 19, 2024
7 tasks
cmd/main.go Outdated Show resolved Hide resolved
@@ -63,7 +63,7 @@ func TestSanitizedPathJoin(t *testing.T) {
{
inputRoot: "/a/b",
inputPath: "/%2e%2e%2f%2e%2e%2f",
expect: filepath.Join("/", "a", "b") + separator,
expect: filepath.Join("/", "a", "b"),
Copy link
Member Author

Choose a reason for hiding this comment

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

The inputPath is deemed by IsLocal() to be unsafe (that is, not local); which surprised me. In that case we just return the root without any request path appended... hence removing the + separator here, but I don't fully 100% understand the reason for this.

@francislavoie
Copy link
Member

Gah. Linter is running into this issue: daixiang0/gci#76 both goimports and gci are fighting eachother on the whitespace before the block comment.

As a workaround, I'm trying to move this import to a file of its own, with the comment above the import so it shouldn't be touched by either tool. I think that should work, right?

@mholt
Copy link
Member Author
mholt commented Apr 19, 2024

Ah, I wondered... Because I manually put it at the very next line but goimports kept adding a new line when I saved. I figured that must be the wrong place, but I guess not.

It looks like the issue upstream in gci is closed? So maybe there's a resolution.

@francislavoie
Copy link
Member

It looks like the issue upstream in gci is closed? So maybe there's a resolution.

Nope, it was closed prematurely

@francislavoie francislavoie added the feature ⚙️ New feature or request label Apr 23, 2024
@francislavoie francislavoie enabled auto-merge (squash) April 23, 2024 23:56
@francislavoie francislavoie merged commit 6d97d8d into master Apr 24, 2024
25 checks passed
@francislavoie francislavoie deleted the go120-issue5288 branch April 24, 2024 00:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature ⚙️ New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants