// withProgress adds a function to be called synchronously as the conversion
// progresses. If delta is in the range [0, 1], the callback will be
// rate-limited to when there is an important change or when the percentage
// changes by more than delta.
withProgress adds a function to be called synchronously as the conversion
progresses. If delta is in the range [0, 1], the callback will be
rate-limited to when there is an important change or when the percentage
changes by more than delta.
// withProgress adds a function to be called synchronously as the conversion // progresses . If delta is in the range [ 0 1 ] the callback will be // rate - limited to when there is an important change or when the percentage // changes by more than delta .
func withProgress(ctx context.Context, delta float64, fn func(n, total int)) context.Context {
	ctx = context.WithValue(ctx, progressDeltaKey{}, delta)
	ctx = context.WithValue(ctx, progressKey{}, fn)
	return ctx
}
func withProgress ( ctx context . Context , delta float64 , fn func ( n , total int ) ) context . Context { ctx = context . WithValue ( ctx , progressDeltaKey { } , delta ) ctx = context . WithValue ( ctx , progressKey { } , fn ) return ctx }
withProgress adds a function to be called synchronously as the conversion
progresses.
withProgress adds a function to be called synchronously as the conversion progresses .