Skip to content

Instantly share code, notes, and snippets.

@AxelRHD
AxelRHD / Makefile
Created July 18, 2019 19:44
Makefile for GO
# Go
GOCMD=go
XGO=xgo
GOBUILD=$(GOCMD) build
GOCLEAN=$(GOCMD) clean
BINARY_NAME=my-app
exec: run clean
@AxelRHD
AxelRHD / go_middleware.go
Last active February 27, 2025 13:48
GO middleware example (with gorilla/mux)
package main
import (
"fmt"
"log"
"net/http"
"github.com/gorilla/context"
"github.com/gorilla/mux"
)
@AxelRHD
AxelRHD / channeling.go
Last active July 31, 2018 21:28
Golang Snippets
package main
import (
"fmt"
"sync"
"time"
)
type message struct {
data int