Skip to content
This repository has been archived by the owner on Mar 31, 2020. It is now read-only.

Latest commit

 

History

History
28 lines (23 loc) · 855 Bytes

README.md

File metadata and controls

28 lines (23 loc) · 855 Bytes

GoKit

Build Status GoDoc Go Report Card

This repository contains useful code that we use in our Go projects.

Examples

web.Server

import (
	"log"
	"time"

	"github.com/moexmen/gokit/web"
)

func main() {
	s := web.Server{
		Addr:    ":8080",
		Timeout: 5 * time.Second,
	}
	log.Println("Starting...")
	log.Println(s.ListenAndServe())
}

If you use docker, docker stop has a default timeout of 10 seconds, the graceful timeout should be set to expire before then.