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

A standard library for our Go projects

License

Notifications You must be signed in to change notification settings

moexmen/gokit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.