File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -118,9 +118,11 @@ func (f *Format) Run() (err error) {
118118 f .formatters [name ] = formatter
119119 }
120120
121- // open the cache
122- if err = cache .Open (f .TreeRoot , f .ClearCache , f .formatters ); err != nil {
123- return err
121+ // open the cache if configured
122+ if ! f .NoCache {
123+ if cache .Open (f .TreeRoot , f .ClearCache , f .formatters ); err != nil {
124+ return err
125+ }
124126 }
125127
126128 // create an app context and listen for shutdown
@@ -148,7 +150,9 @@ func (f *Format) Run() (err error) {
148150 f .processedCh = make (chan * walk.File , cap (f .filesCh ))
149151
150152 // start concurrent processing tasks in reverse order
151- eg .Go (f .updateCache (ctx ))
153+ if ! f .NoCache {
154+ eg .Go (f .updateCache (ctx ))
155+ }
152156 eg .Go (f .applyFormatters (ctx ))
153157 eg .Go (f .walkFilesystem (ctx ))
154158
You can’t perform that action at this time.
0 commit comments