diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index ea07674..f776314 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -10,7 +10,7 @@ jobs: uses: actions/setup-go@v3 with: check-latest: true - go-version: '1.18' + go-version: '1.19' - name: golangci-lint uses: golangci/golangci-lint-action@v3 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e1f5d68..7d85ceb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,7 +8,7 @@ jobs: uses: actions/setup-go@v3 with: check-latest: true - go-version: '1.18' + go-version: '1.19' - name: Check out code into the Go module directory uses: actions/checkout@v3 diff --git a/.golangci.yaml b/.golangci.yaml index cfe4f07..f5b6739 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -14,4 +14,4 @@ linters-settings: - prefix(github.com/Dreamacro/clash) - default staticcheck: - go: '1.18' + go: '1.19' diff --git a/constant/mime/mime.go b/constant/mime/mime.go deleted file mode 100644 index 431457b..0000000 --- a/constant/mime/mime.go +++ /dev/null @@ -1,16 +0,0 @@ -package mime - -import ( - "mime" -) - -var consensusMimes = map[string]string{ - // rfc4329: text/javascript is obsolete, so we need to overwrite mime's builtin - ".js": "application/javascript; charset=utf-8", -} - -func init() { - for ext, typ := range consensusMimes { - mime.AddExtensionType(ext, typ) - } -} diff --git a/hub/route/server.go b/hub/route/server.go index d5d8f72..d1f85e5 100644 --- a/hub/route/server.go +++ b/hub/route/server.go @@ -9,7 +9,6 @@ import ( "time" C "github.com/Dreamacro/clash/constant" - _ "github.com/Dreamacro/clash/constant/mime" "github.com/Dreamacro/clash/log" "github.com/Dreamacro/clash/tunnel/statistic" diff --git a/test/.golangci.yaml b/test/.golangci.yaml index cfaed77..b65afc5 100644 --- a/test/.golangci.yaml +++ b/test/.golangci.yaml @@ -13,4 +13,4 @@ linters-settings: - prefix(github.com/Dreamacro/clash) - default staticcheck: - go: '1.18' + go: '1.19'