{"version":"1.0","type":"rich","title":"golang web examples","description":"This example demonstrates basic HTTP server patterns in Go, showing how to build routes with public and private endpoints. It uses the standard `net/http` package to define handlers for the root, `/post`, and `/json` routes, with middleware wrappers like `BasicAuth`, `GetOnly`, and `PostOnly` controlling access. The code includes functions for basic authentication, request method filtering, and JSON responses via `encoding/json`. A shell script runs `curl` commands to test the server’s behavior.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-6e0b6312fd0ffbd136c1e241b8df8bde?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}