Commit Graph

112 Commits

Author SHA1 Message Date
Bo-Yi Wu acf41a9a1a
feat: enhance static file serving capabilities
- Add documentation for serving local files and embedded folders in README.md
- Add new example code for serving embedded folders in Go
- Create new `embed_folder.go` file with functions to serve embedded folders
- Create new `embed_folder_test.go` file with tests for serving embedded folders
- Add HTML template files for embedded server example
- Rename `static.go` to `local_file.go` and remove unused code
- Create new `local_file_test.go` file with tests for serving local files
- Create new `serve.go` file with middleware handler for serving static files
- Rename `static_test.go` to `serve_test.go` and refactor test functions
- Remove redundant test case `TestListIndex` from `serve_test.go`

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-02-17 16:24:16 +08:00
Bo-Yi Wu 45b3e72f18
fix(lint): should be written without leading space 2024-02-17 16:20:51 +08:00
Bo-Yi Wu ad4c6b0b31
chore: refactor Lint Configuration for Go Project
- Remove `deadcode`, `depguard`, `structcheck`, and `varcheck` linters from the `.golangci.yml` configuration

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-02-17 16:19:53 +08:00
Bo-Yi Wu f07e37c107
chore: update dependencies and Go version
- Update Go version requirement from `1.15` to `1.18`
- Upgrade `github.com/gin-gonic/gin` dependency from `v1.8.1` to `v1.9.1`
- Upgrade `github.com/stretchr/testify` dependency from `v1.8.0` to `v1.8.4`
- Add multiple new indirect dependencies including `github.com/bytedance/sonic`, `github.com/chenzhuoyu/base64x`, and others

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-02-17 16:19:53 +08:00
Bo-Yi Wu 48e0d07f39
ci: update Go versions and CI workflows
- Update supported Go versions in GitHub Actions workflow to 1.18, 1.19, "1.20", 1.21, and 1.22, removing older versions 1.14, 1.15, 1.16, and 1.17

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-02-17 16:19:53 +08:00
Bo-Yi Wu a2c0537cb3
ci: update CI workflows and dependencies
- Standardize cron syntax to use double quotes in codeql.yml
- Update CodeQL action to version 3 in codeql.yml
- Standardize Go version syntax to use double quotes in go.yml
- Update golangci-lint-action to version 4 in go.yml
- Update actions/cache to version 4 in go.yml
- Update codecov-action to version 4 in go.yml
- Standardize wildcard syntax to use double quotes in goreleaser.yml
- Remove unnecessary newlines in goreleaser.yml
- Update Go version to use semver range in goreleaser.yml

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-02-17 16:19:53 +08:00
Bo-Yi Wu ad67ad1bfb
chore: update GitHub actions and dependencies
- Update the GitHub codeql-action/init from v2 to v3

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-02-17 16:19:53 +08:00
Bo-Yi Wu 2a746dee93
chore: update GitHub Actions versions in workflow files
- Update the version of `actions/checkout` from v3 to v4 in `.github/workflows/codeql.yml`
- Update the version of `actions/setup-go` from v3 to v5 in `.github/workflows/go.yml`
- Update the version of `actions/checkout` from v3 to v4 in `.github/workflows/go.yml`
- Update the version of `actions/setup-go` from v3 to v5 in `.github/workflows/go.yml`
- Update the version of `actions/checkout` from v3 to v4 in `.github/workflows/goreleaser.yml`
- Update the version of `actions/setup-go` from v2 to v5 in `.github/workflows/goreleaser.yml`
- Update the version of `goreleaser/goreleaser-action` from v3 to v5 in `.github/workflows/goreleaser.yml`

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-02-17 16:19:53 +08:00
Bo-Yi.Wu 087449607c
chore(CI): add go1.20 version
Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
2024-02-17 16:19:53 +08:00
Bo-Yi.Wu db264bd32c
chore: Add go 1.19 and upgrade lint version to v1.49
Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
2024-02-17 16:19:53 +08:00
ian lyons 8d999d68bd
Fix example link in README.md 2024-02-17 16:19:53 +08:00
dependabot[bot] f12c8a9b24
chore(deps): bump github.com/stretchr/testify from 1.7.5 to 1.8.0
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.5 to 1.8.0.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.7.5...v1.8.0)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-17 16:19:53 +08:00
dependabot[bot] 33b0a22aae
chore(deps): bump github.com/stretchr/testify from 1.7.3 to 1.7.5
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.3 to 1.7.5.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.7.3...v1.7.5)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-17 16:19:53 +08:00
dependabot[bot] 4f067b5d62
chore(deps): bump github.com/stretchr/testify from 1.7.2 to 1.7.3
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.2 to 1.7.3.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.7.2...v1.7.3)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-17 16:19:53 +08:00
dependabot[bot] 9bd6c69310
chore(deps): bump github.com/stretchr/testify from 1.7.1 to 1.7.2
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.1 to 1.7.2.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.7.1...v1.7.2)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-17 16:19:53 +08:00
dependabot[bot] b99f153553
chore(deps): bump github.com/gin-gonic/gin from 1.8.0 to 1.8.1
Bumps [github.com/gin-gonic/gin](https://github.com/gin-gonic/gin) from 1.8.0 to 1.8.1.
- [Release notes](https://github.com/gin-gonic/gin/releases)
- [Changelog](https://github.com/gin-gonic/gin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/gin-gonic/gin/compare/v1.8.0...v1.8.1)

---
updated-dependencies:
- dependency-name: github.com/gin-gonic/gin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-17 16:19:53 +08:00
dependabot[bot] f82b50de80
chore(deps): bump github.com/gin-gonic/gin from 1.7.7 to 1.8.0
Bumps [github.com/gin-gonic/gin](https://github.com/gin-gonic/gin) from 1.7.7 to 1.8.0.
- [Release notes](https://github.com/gin-gonic/gin/releases)
- [Changelog](https://github.com/gin-gonic/gin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/gin-gonic/gin/compare/v1.7.7...v1.8.0)

---
updated-dependencies:
- dependency-name: github.com/gin-gonic/gin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-17 16:19:53 +08:00
dependabot[bot] 76c2495f7f
chore(deps): bump goreleaser/goreleaser-action from 2 to 3
Bumps [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action) from 2 to 3.
- [Release notes](https://github.com/goreleaser/goreleaser-action/releases)
- [Commits](https://github.com/goreleaser/goreleaser-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: goreleaser/goreleaser-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-17 16:19:53 +08:00
Bo-Yi Wu cd3f75b68c
chore(CD): enable goreleaser config.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-02-17 16:19:53 +08:00
dependabot[bot] a7b3745793
chore(deps): bump github.com/gin-gonic/gin from 1.7.4 to 1.7.7
Bumps [github.com/gin-gonic/gin](https://github.com/gin-gonic/gin) from 1.7.4 to 1.7.7.
- [Release notes](https://github.com/gin-gonic/gin/releases)
- [Changelog](https://github.com/gin-gonic/gin/blob/master/CHANGELOG.md)
- [Commits](https://github.com/gin-gonic/gin/compare/v1.7.4...v1.7.7)

---
updated-dependencies:
- dependency-name: github.com/gin-gonic/gin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-17 16:19:53 +08:00
dependabot[bot] 92f14100db
chore(deps): bump github.com/stretchr/testify from 1.7.0 to 1.7.1
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.0 to 1.7.1.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.7.0...v1.7.1)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-17 16:19:53 +08:00
dependabot[bot] a476d0bf78
chore(deps): bump github/codeql-action from 1 to 2
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 1 to 2.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v1...v2)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-17 16:19:53 +08:00
Bo-Yi Wu 8c4fd211e2
chore(github): upgrade action package.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-02-17 16:19:53 +08:00
Bo-Yi Wu cd348215ef
chore(CI/CD): add dependabot
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-02-17 16:19:53 +08:00
Bo-Yi Wu 4779c447f0
chore(CI/CD): remove macos-latest testing
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-02-17 16:19:53 +08:00
Bo-Yi Wu a16b37a264
chore: upgrade checkout version to v3
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-02-17 16:19:53 +08:00
Bo-Yi Wu faf596eb66
feat(CodeQL): Discover vulnerabilities across a codebase with CodeQL
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-02-17 16:19:53 +08:00
Bo-Yi Wu a99fa6d897
chore(lint): add golang lint config
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-02-17 16:19:51 +08:00
Bo-Yi Wu f6388b32d6
chore(lint): upgrade /golangci-lint to v1.43.0
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-02-17 16:19:12 +08:00
Bo-Yi Wu 27e67fb73d
docs: add github actions badge
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-02-17 16:19:12 +08:00
Bo-Yi Wu d361912309
chore: fix lint
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-02-17 16:19:10 +08:00
Bo-Yi Wu 111c2d589e
chore: update gin to v1.7.4
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-02-17 16:18:14 +08:00
Bo-Yi Wu 651b99ac00
chore: switch travis to github actions.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-02-17 16:18:14 +08:00
Bo-Yi Wu 4cbe726267
chore: rename example to _example 2024-02-17 16:18:12 +08:00
Bo-Yi Wu 7cf53f6857
chore: add go1.16 version 2024-02-17 16:16:48 +08:00
Bo-Yi Wu 80d4aac2c6
fix(lint): should be written without leading space 2024-02-17 16:09:05 +08:00
Bo-Yi Wu aa17ccf831
chore: refactor Lint Configuration for Go Project
- Remove `deadcode`, `depguard`, `structcheck`, and `varcheck` linters from the `.golangci.yml` configuration

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-02-17 16:07:48 +08:00
Bo-Yi Wu 2958f15884
chore: update dependencies and Go version
- Update Go version requirement from `1.15` to `1.18`
- Upgrade `github.com/gin-gonic/gin` dependency from `v1.8.1` to `v1.9.1`
- Upgrade `github.com/stretchr/testify` dependency from `v1.8.0` to `v1.8.4`
- Add multiple new indirect dependencies including `github.com/bytedance/sonic`, `github.com/chenzhuoyu/base64x`, and others

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-02-14 12:36:40 +08:00
Bo-Yi Wu 9e163ee30e
ci: update Go versions and CI workflows
- Update supported Go versions in GitHub Actions workflow to 1.18, 1.19, "1.20", 1.21, and 1.22, removing older versions 1.14, 1.15, 1.16, and 1.17

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-02-14 12:35:50 +08:00
Bo-Yi Wu 670c639d75
ci: update CI workflows and dependencies
- Standardize cron syntax to use double quotes in codeql.yml
- Update CodeQL action to version 3 in codeql.yml
- Standardize Go version syntax to use double quotes in go.yml
- Update golangci-lint-action to version 4 in go.yml
- Update actions/cache to version 4 in go.yml
- Update codecov-action to version 4 in go.yml
- Standardize wildcard syntax to use double quotes in goreleaser.yml
- Remove unnecessary newlines in goreleaser.yml
- Update Go version to use semver range in goreleaser.yml

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-02-14 12:35:16 +08:00
Bo-Yi Wu 1ff8cd13f7
chore: update GitHub actions and dependencies
- Update the GitHub codeql-action/init from v2 to v3

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2023-12-30 09:34:47 +08:00
Bo-Yi Wu eaf6a9f6ef
chore: update GitHub Actions versions in workflow files
- Update the version of `actions/checkout` from v3 to v4 in `.github/workflows/codeql.yml`
- Update the version of `actions/setup-go` from v3 to v5 in `.github/workflows/go.yml`
- Update the version of `actions/checkout` from v3 to v4 in `.github/workflows/go.yml`
- Update the version of `actions/setup-go` from v3 to v5 in `.github/workflows/go.yml`
- Update the version of `actions/checkout` from v3 to v4 in `.github/workflows/goreleaser.yml`
- Update the version of `actions/setup-go` from v2 to v5 in `.github/workflows/goreleaser.yml`
- Update the version of `goreleaser/goreleaser-action` from v3 to v5 in `.github/workflows/goreleaser.yml`

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2023-12-11 21:37:53 +08:00
Bo-Yi.Wu 6f6aff627d chore(CI): add go1.20 version
Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
2023-02-12 09:24:09 +08:00
Bo-Yi.Wu 3035101e24 chore: Add go 1.19 and upgrade lint version to v1.49
Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
2022-08-29 21:17:51 +08:00
thinkerou 1e2ad02192
Merge pull request #39 from ianlyons/patch-1
Fix example link in README.md
2022-08-24 09:28:19 +08:00
ian lyons e87c665885
Fix example link in README.md 2022-08-23 17:23:00 -04:00
thinkerou efaf9c28b2
Merge pull request #37 from gin-contrib/dependabot/go_modules/github.com/stretchr/testify-1.8.0
chore(deps): bump github.com/stretchr/testify from 1.7.5 to 1.8.0
2022-07-05 09:57:08 +08:00
dependabot[bot] 97f093707c
chore(deps): bump github.com/stretchr/testify from 1.7.5 to 1.8.0
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.5 to 1.8.0.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.7.5...v1.8.0)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-04 20:07:01 +00:00
thinkerou dbe4f68231
Merge pull request #36 from gin-contrib/dependabot/go_modules/github.com/stretchr/testify-1.7.5
chore(deps): bump github.com/stretchr/testify from 1.7.3 to 1.7.5
2022-06-28 10:44:11 +08:00
dependabot[bot] e1129d3099
chore(deps): bump github.com/stretchr/testify from 1.7.3 to 1.7.5
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.3 to 1.7.5.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.7.3...v1.7.5)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-27 20:12:48 +00:00