- 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>
14 lines
217 B
Go
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)
|
|
}
|
|
}
|