Go/cmd/example-go/main.go
Bo-Yi Wu f171daa81a
feat: implement example-go service with Docker support
- Add a new Makefile with build, docker-build, test, and clean targets, including cross-compilation support for Linux AMD64 and ARM64.
- Introduce a new Go executable `example-go` with a basic HTTP server setup.
- Create a new Dockerfile for an Alpine-based container including the `example-go` binary, with metadata labels and an entrypoint.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2024-02-20 09:51:50 +08:00

14 lines
217 B
Go

package main
import (
"gitea.com/action-examples/go/router"
)
func main() {
r := router.New()
// listen and serve on 0.0.0.0:8080 (for windows "localhost:8080")
if err := r.Run(); err != nil {
panic(err)
}
}