nkovacs / streamquote

Go package providing a streaming version of strconv.Quote.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

streamquote Build Status GoDoc

This package provides a streaming version of strconv.Quote.

It allows you to quote the data in an io.Reader and write it out to an io.Writer without having to store the entire input and the entire output in memory.

Its primary use case is go.rice and similar tools, which need to convert lots of files, some of them quite large, to go strings.

converter := streamquote.New()
converter.Convert(inputfile, outfile)

Unlike strconv.Quote, it does not add quotes around the output.

About

Go package providing a streaming version of strconv.Quote.

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Go 100.0%