func NewWriter(w io.Writer) *Writer {
	return &Writer{
		w:   w,
		ctx: context.Background(),
	}
}
NewWriter returns a writer that implements io.Writer with rate limiting.
package shapeio
import (
	"context"
	"io"
	"time"
	"golang.org/x/time/rate"
)
const burstLimit = 1000 * 1000 * 1000
type Reader struct {
	r       io.Reader
	limiter *rate.Limiter
	ctx     context.Context
}
type Writer struct {
	w       io.Writer
	limiter *rate.Limiter
	ctx     context.Context
}
func NewReader(r io.Reader) *Reader {
	return &Reader{
		r:   r,
		ctx: context.Background(),
	}
}
func NewReaderWithContext(r io.Reader, ctx context.Context) *Reader {
	return &Reader{
		r:   r,
		ctx: ctx,
	}
}