Skip to content

Instantly share code, notes, and snippets.

View ofstudio's full-sized avatar

Oleg Fomin ofstudio

View GitHub Profile
@lummie
lummie / enum.go
Last active September 16, 2024 18:03
Golang Enum pattern that can be serialized to json
package enum_example
import (
"bytes"
"encoding/json"
)
// TaskState represents the state of task, moving through Created, Running then Finished or Errorred
type TaskState int
@JalfResi
JalfResi / revprox.go
Last active October 25, 2024 15:41
Simple reverse proxy in Go
package main
import(
"log"
"net/url"
"net/http"
"net/http/httputil"
)
func main() {