0.26.5
Changelog
Full change log from v0.25.3
0.26.5
- BUG: no-inline test; issue below by @poteto0 in #173
#169 - TEST: ut upgrated by @poteto0 in #173
- REF: split cmd & engine by @poteto0 in #173
0.26.4
- REFACT: poteto & middleware by @poteto0 in #171
- FEAT:
ctx.SetResponseHeader(key, value string)
internal callres.Header().Set(key, value string)
by @poteto0 in #171 - FEAT:
Response.SetHeader(key, value string)
internal callwriter.Header().Set(key, value string)
by @poteto0 in #171 - FEAT:
ctx.GetRequestHeaderParam(key string) string
internal callreq.Header().Get(key string) string
by @poteto0 in #171 - FEAT:
ctx.ExtractRequestHeaderParam(key string) []string
internal callreturn req.Header[key]
by @poteto0 in #171 - FEAT:
AddHeader(key, value string)
internal callwriter.Add(key, value string)
by @poteto0 in #171
0.26.3
- TEST: fix not ut in poteto-cli by @poteto0 in #168
- FEAT: FEAT:
poteto-cli new -d | --docker
gen with Dockerfile & docker-compose.yaml by @poteto0 in #168 - FEAT:
poteto-cli new -j | --jsonrpc
gen jsonrpc template by @poteto0 in #166
0.26.2
- TEST: add benchmark by @poteto0 in #164
- Build(deps): bump github.com/goccy/go-yaml from 1.15.10 to 1.15.13 in #163
0.26.1
- EXAMPLE: add example on jsonrpc by @poteto0 in #160
- EXAMPLE: add example on fast-api by @poteto0 in #160
- EXAMPLE: add example on api by @poteto0 in #160
- BUG: fix
PotetoJSONRPCAdapter
dosen't check class by @poteto0 in #158
0.26.0
KeyNote: You can serve JSONRPC server easily.
type (
Calculator struct{}
AdditionArgs struct {
Add, Added int
}
)
func (tc *TestCalculator) Add(r *http.Request, args *AdditionArgs) int {
return args.Add + args.Added
}
func main() {
p := New()
rpc := TestCalculator{}
// you can access "/add/Calculator.Add"
p.POST("/add", func(ctx Context) error {
return PotetoJsonRPCAdapter[Calculator, AdditionArgs](ctx, &rpc)
})
p.Run("8080")
}