func NewDirRewriter(rep repo.RepositoryWriter, opts DirRewriterOptions) *DirRewriter {
	if opts.Parallel == 0 {
		opts.Parallel = runtime.NumCPU()
	}

	if opts.OnDirectoryReadFailure == nil {
		opts.OnDirectoryReadFailure = RewriteFail
	}

	return &DirRewriter{
		ws:   workshare.NewPool(opts.Parallel - 1),
		opts: opts,
		rep:  rep,
	}
}
// NewDirRewriter creates a new directory rewriter.
NewDirRewriter creates a new directory rewriter.
// NewDirRewriter creates a new directory rewriter .
func NewDirRewriter(rep repo.RepositoryWriter, opts DirRewriterOptions) *DirRewriter {
	if opts.Parallel == 0 {
		opts.Parallel = runtime.NumCPU()
	}
	if opts.OnDirectoryReadFailure == nil {
		opts.OnDirectoryReadFailure = RewriteFail
	}
	return &DirRewriter{
		ws:   workshare.NewPool(opts.Parallel - 1),
		opts: opts,
		rep:  rep,
	}
}
func NewDirRewriter ( rep repo . RepositoryWriter , opts DirRewriterOptions ) * DirRewriter { if opts . Parallel == 0 { opts . Parallel = runtime . NumCPU ( ) } if opts . OnDirectoryReadFailure == nil { opts . OnDirectoryReadFailure = RewriteFail } return & DirRewriter { ws : workshare . NewPool ( opts . Parallel - 1 ) , opts : opts , rep : rep , } }
NewDirRewriter creates a new directory rewriter.
NewDirRewriter creates a new directory rewriter .