Skip to content

Instantly share code, notes, and snippets.

View juan-carl0s's full-sized avatar
🐵

Juan Angel juan-carl0s

🐵
View GitHub Profile
alias dc='docker compose'
alias godep='go get -u all && go mod tidy && go mod vendor'
alias gta='go test -race ./...'
alias gtr='go test -v -cover -race ./...'
alias uuidc="uuidgen | tr -d '\n' | tr '[:upper:]' '[:lower:]' | pbcopy"
@juan-carl0s
juan-carl0s / idleConnClosed.go
Last active July 17, 2020 19:38
HTTP Response body must be closed for the underlying transport to be able to close idle connections using CloseIdleConnections()
package main
import (
"bytes"
"fmt"
"io/ioutil"
"net"
"net/http"
"net/http/cookiejar"
"net/http/httptest"