Skip to content

Instantly share code, notes, and snippets.

View buhuipao's full-sized avatar
🥕
Focusing

buhuipao buhuipao

🥕
Focusing
View GitHub Profile
@buhuipao
buhuipao / compress_tar_gzip.go
Created September 12, 2020 03:30 — forked from mimoo/compress_tar_gzip.go
How to compress a folder in Golang using tar and gzip (works with nested folders)
package main
import (
"archive/tar"
"bytes"
"compress/gzip"
"fmt"
"io"
"os"
"path/filepath"