abra/vendor/github.com/mattn/go-localereader/localereader.go
decentral1se 517616f9fb
All checks were successful
continuous-integration/drone/push Build is passing
feat: improved deploy progress reporting
See #478
2025-03-23 10:12:11 +01:00

20 lines
298 B
Go

package localereader
import (
"bytes"
"io"
)
func NewReader(r io.Reader) io.Reader {
return newReader(r)
}
func UTF8(b []byte) ([]byte, error) {
var buf bytes.Buffer
n, err := io.Copy(&buf, newReader(bytes.NewReader(b)))
if err != nil {
return nil, err
}
return buf.Bytes()[:n], nil
}