2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 13:47:15 +08:00

fix: lint

This commit is contained in:
耗子
2023-07-07 19:24:47 +08:00
parent 92f84d278e
commit f20e942bea
2 changed files with 9 additions and 2 deletions

View File

@@ -7,7 +7,7 @@ on:
permissions:
contents: read
jobs:
golangci:
lint:
name: lint
runs-on: ubuntu-latest
steps:
@@ -15,8 +15,12 @@ jobs:
- uses: actions/setup-go@v4
with:
go-version: 'stable'
- name: golangci-lint
cache: false
- name: Lint
uses: golangci/golangci-lint-action@v3
with:
skip-cache: true
skip-pkg-cache: true
skip-build-cache: true
version: latest
args: --timeout=30m ./...

View File

@@ -79,6 +79,9 @@ func GetLatestPanelVersion() (PanelInfo, error) {
}
defer os.Remove(file.Name())
_, err = file.Write(output)
if err != nil {
return info, errors.New("写入临时文件失败")
}
err = file.Close()
if err != nil {
return info, errors.New("关闭临时文件失败")