actions
Security / scan (1.19.13) (push) Successful in 1m1s Details
Security / scan (>=1.20) (push) Successful in 49s Details
Test / uint (1.19.13, ubuntu-latest) (push) Successful in 52s Details
Test / uint (>=1.20, ubuntu-latest) (push) Successful in 50s Details
Verify / lint (1.19.13) (push) Successful in 1m40s Details
Verify / lint (>=1.20) (push) Successful in 1m9s Details

This commit is contained in:
Akvicor 2024-01-24 00:15:07 +08:00
parent b9045bbd12
commit 4833cbaec1
4 changed files with 155 additions and 154 deletions

View File

@ -16,7 +16,7 @@ jobs:
scan: scan:
strategy: strategy:
matrix: matrix:
go: ['>=1.19.8'] go: ['1.19.13', '>=1.20']
fail-fast: true fail-fast: true
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:

View File

@ -16,7 +16,7 @@ jobs:
uint: uint:
strategy: strategy:
matrix: matrix:
go: ['>=1.19.8'] go: ['1.19.13', '>=1.20']
os: [ubuntu-latest] os: [ubuntu-latest]
fail-fast: true fail-fast: true
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}

View File

@ -16,7 +16,7 @@ jobs:
lint: lint:
strategy: strategy:
matrix: matrix:
go: ['>=1.19.8'] go: ['1.19.13', '>=1.20']
fail-fast: true fail-fast: true
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:

View File

@ -5,6 +5,7 @@ import (
"io" "io"
"os" "os"
"path" "path"
"path/filepath"
"runtime" "runtime"
"sync" "sync"
"time" "time"
@ -71,7 +72,7 @@ func SetFlag(f int) {
} }
func SetLogFile(path string) error { func SetLogFile(path string) error {
f, err := os.OpenFile(path, os.O_WRONLY|os.O_APPEND|os.O_CREATE, 0644) f, err := os.OpenFile(filepath.Clean(path), os.O_WRONLY|os.O_APPEND|os.O_CREATE, 0600)
if err != nil { if err != nil {
return err return err
} }