Skip to content

stokito/go-gzip-buf-file

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-gzip-buf-file

gzip compressed log/file

Install

go get -u github.com/stokito/[email protected]

Usage

package main

import (
	"github.com/stokito/go-gzip-buf-file"
	"log"
)

func main() {
    requestResponseDump, err := gzip_log.NewGzBufFile("request_log.ndjson.gz")
    if err != nil {
        log.Printf("init log failed %s\n", err.Error())
    }
    requestResponseDump.WriteTwoLines(requestBody, responseData)
    if requestResponseDump != nil {
        requestResponseDump.Close()
    }
}

License

0BSD (similar to Public Domain)