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

mime: glob pattern is not expanded #52609

Open
zhsj opened this issue Apr 28, 2022 · 4 comments · May be fixed by #53974
Open

mime: glob pattern is not expanded #52609

zhsj opened this issue Apr 28, 2022 · 4 comments · May be fixed by #53974
Labels
help wanted NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@zhsj
Copy link
Contributor

zhsj commented Apr 28, 2022

What version of Go are you using (go version)?

$ go version
go version go1.18.1 linux/amd64

Does this issue reproduce with the latest release?

Yes.

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/zhsj/.cache/go-build"
GOENV="/home/zhsj/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/zhsj/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/zhsj/go"
GOPRIVATE=""
GOPROXY="https://goproxy.cn"
GOROOT="/usr/lib/go-1.18"
GOSUMDB="sum.golang.google.cn"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go-1.18/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.18.1"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/tmp/t/t/go.mod"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build341454139=/tmp/go-build -gno-record-gcc-switches"

What did you do?

package main

import (
        "fmt"
        "mime"
)

func main() {
        exts, _ := mime.ExtensionsByType("video/x-anim")
        fmt.Println(exts)
        typ := mime.TypeByExtension(".anim1")
        fmt.Println(typ)
}

What did you expect to see?

.anim1 .anim2 .anim3 .anim4 .anim5 .anim6 .anim7 .anim8 .anim9 .animj
video/x-anim

What did you see instead?

[.anim[1-9j]]

/usr/share/mime/globs2 has 50:video/x-anim:*.anim[1-9j].

@ianlancetaylor ianlancetaylor added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Apr 28, 2022
@ianlancetaylor ianlancetaylor added this to the Backlog milestone Apr 28, 2022
@ianlancetaylor
Copy link
Contributor

CC @Jacalz

@Jacalz
Copy link
Contributor

Jacalz commented Apr 29, 2022

CC @Jacalz

I guess this makes sense, but I don’t think I’ll be able to look at this any time soon though. I’m quite busy with university studies at the moment.

@kkHAIKE
Copy link
Contributor

kkHAIKE commented May 3, 2022

but this case was skiped recently
df2421d

@nikola-jokic nikola-jokic linked a pull request Jul 20, 2022 that will close this issue
@gopherbot
Copy link

Change https://go.dev/cl/418556 mentions this issue: mime: range glob expansions in type_unix.go

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants