Commit Graph

8 Commits

Author SHA1 Message Date
appleboy 9dfe08a58c
chore: update module and import paths
- Change the module name from "example" to "gitea.com/action-examples/go" in go.mod
- Update the import path from "example/router" to "gitea.com/action-examples/go/router" in main.go

Signed-off-by: appleboy <appleboy.tw@gmail.com>
2024-01-27 23:05:15 +08:00
appleboy 6edc3a2d12
chore: update Go version and add dependencies
- Update the Go version from `1.21.2` to `1.21`
- Add `github.com/stretchr/testify` as a required dependency
- Add `github.com/davecgh/go-spew` as an indirect dependency
- Add `github.com/pmezard/go-difflib` as an indirect dependency
- Add a new test file `router/router_test.go`
- Implement a test for the `PingRoute` function in `router/router_test.go`

Signed-off-by: appleboy <appleboy.tw@gmail.com>
2024-01-27 23:04:20 +08:00
appleboy 1ab24b1efd
feat: add new router and ping route to main application
- Remove the import statement for "github.com/gin-gonic/gin" in main.go
- Add a new file called router.go in the router directory
- Create a new function called New() in router.go that returns a *gin.Engine
- Add a GET route for "/ping" in the New() function in router.go

Signed-off-by: appleboy <appleboy.tw@gmail.com>
2024-01-27 23:02:26 +08:00
appleboy fe12037cbb
build: add Go module and basic HTTP server using gin-gonic/gin
- Add a new file `go.mod` with the content of a Go module
- Specify the module name as `example`
- Specify the Go version as `1.21.2`
- Add a requirement for the package `github.com/gin-gonic/gin` with version `v1.9.1`
- Add multiple indirect requirements for various packages
- Add a new file `main.go` with a basic Go program using the `gin-gonic/gin` package to create an HTTP server

Signed-off-by: appleboy <appleboy.tw@gmail.com>
2024-01-27 22:59:59 +08:00
appleboy eb2f1694ab
docs: update README.md with information about Gitea Actions
- Update the description of the README.md file
- Add information about Gitea Actions as a built-in CI/CD solution

Signed-off-by: appleboy <appleboy.tw@gmail.com>
2024-01-27 22:57:42 +08:00
appleboy 08238cfd93 docs: update link 2024-01-27 14:54:03 +00:00
appleboy 5f75d56197 docs: update link 2024-01-27 14:53:48 +00:00
appleboy cc4ad62fe8 Initial commit 2024-01-27 14:49:10 +00:00