Skip to content

0.26.5

Compare
Choose a tag to compare
@poteto0 poteto0 released this 18 Dec 11:57
· 32 commits to main since this release
68f071e

Changelog

Full change log from v0.25.3

0.26.5

0.26.4

  • REFACT: poteto & middleware by @poteto0 in #171
  • FEAT: ctx.SetResponseHeader(key, value string) internal call res.Header().Set(key, value string) by @poteto0 in #171
  • FEAT: Response.SetHeader(key, value string) internal call writer.Header().Set(key, value string) by @poteto0 in #171
  • FEAT: ctx.GetRequestHeaderParam(key string) string internal call req.Header().Get(key string) string by @poteto0 in #171
  • FEAT: ctx.ExtractRequestHeaderParam(key string) []string internal call return req.Header[key] by @poteto0 in #171
  • FEAT: AddHeader(key, value string) internal call writer.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

0.26.0

  • FEATURE: PotetoJSONAdapter provides json rpc by @poteto0 in #154

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")
}
  • FEATURE: Poteto.RunTLS serve https server provided cert & key file by @poteto0 in #144