Compare commits

...

14 Commits

Author SHA1 Message Date
Andrea Spacca
185bc786bf lint 2023-03-01 21:23:22 +09:00
Andrea Spacca
200a394de6 lint 2023-03-01 18:54:04 +09:00
Andrea Spacca
29cd7525b6 lint 2023-03-01 18:51:36 +09:00
Andrea Spacca
9e44c9e6a7 lint 2023-03-01 18:50:49 +09:00
Andrea Spacca
fad64cd84b lint 2023-03-01 18:21:28 +09:00
Andrea Spacca
c1a8dd22e0 lint 2023-03-01 18:21:15 +09:00
Andrea Spacca
aa72b7a6c4 lint 2023-03-01 18:20:15 +09:00
Andrea Spacca
1c5d12a5f1 lint 2023-03-01 18:17:46 +09:00
Andrea Spacca
232e19a22b lint 2023-03-01 18:13:36 +09:00
Andrea Spacca
7227aa1b4e lint 2023-03-01 18:12:17 +09:00
Andrea Spacca
75f2d04650 lint 2023-03-01 18:11:06 +09:00
Andrea Spacca
55b74294d6 lint 2023-03-01 18:09:43 +09:00
Andrea Spacca
b392f9977a lint 2023-03-01 18:06:34 +09:00
Andrea Spacca
9000ad1a45 min go version 1.18, include tip for test 2023-03-01 18:01:59 +09:00
2 changed files with 19 additions and 9 deletions

View File

@@ -13,16 +13,27 @@ jobs:
fail-fast: false
matrix:
go_version:
- 1.15.x
- 1.16.x
- 1.17.x
- 1.18.X
- '1.18'
- '1.19'
- '1.20'
- tip
name: Test with ${{ matrix.go_version }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v1
- name: Install Go ${{ matrix.go_version }}
if: ${{ matrix.go_version != 'tip' }}
uses: actions/setup-go@master
with:
go-version: ${{ matrix.go_version }}
check-latest: true
- name: Install Go ${{ matrix.go_version }}
if: ${{ matrix.go_version == 'tip' }}
run: |
curl -sL https://storage.googleapis.com/go-build-snap/go/linux-amd64/$(git ls-remote https://github.com/golang/go.git HEAD | awk '{print $1;}').tar.gz -o gotip.tar.gz
ls -lah gotip.tar.gz
mkdir -p ~/sdk/gotip
tar -C ~/sdk/gotip -xzf gotip.tar.gz
echo "PATH=$HOME/go/bin:$HOME/sdk/gotip/bin/:$PATH" >> $GITHUB_ENV
- name: Vet and test
run: |
go version
@@ -33,9 +44,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v1
- uses: actions/setup-go@master
with:
go-version: 1.18
go-version: '1.20'
check-latest: true
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:

View File

@@ -466,8 +466,6 @@ func (s *Server) Run() {
r.HandleFunc("/{action:(?:download|get|inline)}/{token}/{filename}", s.headHandler).Methods("HEAD")
r.HandleFunc("/{token}/{filename}", s.previewHandler).MatcherFunc(func(r *http.Request, rm *mux.RouteMatch) (match bool) {
match = false
// The file will show a preview page when opening the link in browser directly or
// from external link. If the referer url path and current path are the same it will be
// downloaded.