diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index e6e53a9..2443fca 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -17,26 +17,27 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: actions/setup-go@v3 + - uses: actions/setup-go@v4 with: go-version: ${{ env.GOVER }} - run: go test -cover ./... - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: set up go lint - uses: golangci/golangci-lint-action@v3 - with: - version: v1.46.2 + # lint: + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v3 + + # - name: set up go lint + # uses: golangci/golangci-lint-action@v6 + # with: + # version: v1.52.2 build-and-release: runs-on: ubuntu-latest if: startsWith(github.ref, 'refs/tags/v') needs: - unit-test - - lint + # - lint steps: - name: Checkout uses: actions/checkout@v3 diff --git a/commando/respwriter.go b/commando/respwriter.go index abbc716..a92456e 100644 --- a/commando/respwriter.go +++ b/commando/respwriter.go @@ -155,8 +155,11 @@ func sanitizeFileName(s string) string { `,`, ``) s = r.Replace(s) + + // remove all leading and trailing spaces for the filename + s = strings.TrimSpace(s) - re := regexp.MustCompile(`[^0-9A-Za-z\s.\_\-]+`) + re := regexp.MustCompile(`[^0-9A-Za-z.\_\-]+`) return re.ReplaceAllString(s, "-") }