Skip to content

v0.1.1

Compare
Choose a tag to compare
@saurabh0719 saurabh0719 released this 19 Sep 16:25
· 39 commits to main since this release
7f5ea8b

Jett, version 0.1.1

Description -

Accept ctx context.Context in Run functions

// Run without context -
func (r *Router) Run(address string, onShutdownFns ...func())
func (r *Router) RunTLS(address, certFile, keyFile string, onShutdownFns ...func())

// Run with context -
// Useful when you need to pass a top-level context. Shutdown process will begin when the parent context cancels.

func (r *Router) RunWithContext(ctx context.Context, address string, onShutdownFns ...func())
func (r *Router) RunTLSWithContext(ctx context.Context, address, certFile, keyFile string, onShutdownFns ...func())

Modified Response writers function names - JSON, XML, TEXT

func JSON(w http.ResponseWriter, data interface{}, status int)
func TEXT(w http.ResponseWriter, data string, status int)
func XML(w http.ResponseWriter, data interface{}, status int)