Skip to content

v0.2.0

Choose a tag to compare

@ryanhamamura ryanhamamura released this 12 Jan 10:49
· 64 commits to main since this release

What's New

Browser Navigation Methods

Added SSE-based navigation methods to Context:

  • Redirect(url) / Redirectf(format, args...) - Navigate to a new page (full page load)
  • ReplaceURL(url) / ReplaceURLf(format, args...) - Update browser URL without navigation (history.replaceState)

Example Usage

// Redirect after login
login := c.Action(func() {
    if authenticated {
        c.Redirect("/dashboard")
    }
})

// Update URL for pagination without reload
c.ReplaceURLf("/products?page=%d", page)

Updated Examples

  • Session example now demonstrates a full login flow with redirects across /login and /dashboard pages