Skip to content

Instantly share code, notes, and snippets.

@JalfResi
JalfResi / revprox.go
Last active August 9, 2025 19:56
Simple reverse proxy in Go
package main
import(
"log"
"net/url"
"net/http"
"net/http/httputil"
)
func main() {
@staltz
staltz / introrx.md
Last active October 9, 2025 18:43
The introduction to Reactive Programming you've been missing
@crgimenes
crgimenes / stringToReaderCloser.go
Last active March 11, 2025 06:14
string to io.ReadCloser
package main
import (
"bytes"
"fmt"
"io"
"os"
"strings"
)
@wrfly
wrfly / stream-server.go
Created June 6, 2018 03:33
go-gin | http stream server
package main
import (
"bytes"
"fmt"
"io"
"net/http"
"time"
"github.com/gin-gonic/gin"
@stnguyen90
stnguyen90 / handling-null-json-arrays-in-go-dynamic-initialization.go
Last active September 6, 2023 10:09
Handling Null JSON Arrays in Go - Dynamic Initialization
package main
import (
"encoding/json"
"fmt"
"reflect"
)
// Bag holds items
type Bag struct {