File tree Expand file tree Collapse file tree 4 files changed +59
-0
lines changed
Expand file tree Collapse file tree 4 files changed +59
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build and Release
2+
3+ on :
4+ push :
5+ tags :
6+ - ' *'
7+
8+ permissions :
9+ contents : write
10+
11+ jobs :
12+ build :
13+ runs-on : ubuntu-latest
14+ steps :
15+ - name : Checkout
16+ uses : actions/checkout@v3
17+ - name : Set up Go
18+ uses : actions/setup-go@v3
19+ with :
20+ go-version : 1.18
21+ - name : Release
22+ 23+ if : startsWith(github.ref, 'refs/tags/')
Original file line number Diff line number Diff line change 1+ package hello
2+
3+ import (
4+ "github.com/go-gorf/gorf"
5+ )
6+
7+ func setup () error {
8+ // Add setup here
9+ return nil
10+ }
11+
12+ var HelloApp = gorf.GorfBaseApp {
13+ Name : "Hello" ,
14+ RouteHandler : Urls ,
15+ SetUpHandler : setup ,
16+ }
Original file line number Diff line number Diff line change 1+ package hello
2+
3+ import "github.com/gin-gonic/gin"
4+
5+ func Urls (r * gin.Engine ) {
6+ r .POST ("/hello" , Hello )
7+ }
Original file line number Diff line number Diff line change 1+ package hello
2+
3+ import (
4+ "net/http"
5+
6+ "github.com/gin-gonic/gin"
7+ )
8+
9+ func Hello (ctx * gin.Context ) {
10+ ctx .JSON (http .StatusOK , gin.H {
11+ "message" : "Hello world" ,
12+ })
13+ }
You can’t perform that action at this time.
0 commit comments