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 May 2, 2024 13:13
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 May 2, 2024 13:27
Simple reverse proxy in Go
package main
import(
"log"
"net/url"
"net/http"
"net/http/httputil"
)
func main() {