Skip to content

Instantly share code, notes, and snippets.

View sadhasivam's full-sized avatar

sadhasivam sadhasivam

  • SR INC
  • ChesterSprings PA
View GitHub Profile
@sadhasivam
sadhasivam / Makefile
Created May 9, 2023 06:33 — forked from alexedwards/Makefile
Boilerplate Makefile for Go projects
# Change these variables as necessary.
MAIN_PACKAGE_PATH := ./cmd/example
BINARY_NAME := example
# ==================================================================================== #
# HELPERS
# ==================================================================================== #
## help: print this help message
.PHONY: help
@sadhasivam
sadhasivam / main.go
Created January 7, 2018 17:40 — forked from enricofoltran/main.go
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"os/signal"
@sadhasivam
sadhasivam / Ignore .DS_Store forever
Created July 8, 2017 14:12 — forked from linuslundahl/Ignore .DS_Store forever
Make git always ignore .DS_Store
$ git config --global core.excludesfile ~/.gitignore
$ echo .DS_Store >> ~/.gitignore
package future
// A Future represents the result of some asynchronous computation.
// Future returns the result of the work as an error, or nil if the work
// was performed successfully.
// Implementers must observe these invariants
// 1. There may be multiple concurrent callers, or Future may be called many
// times in sequence, it must always return the same value.
// 2. Future blocks until the work has been performed.
type Future func() error