@@ -204,10 +204,10 @@ func main() {
204
204
log .Fatalf ("Mode must be one of auto=guess, go=golang source, text=plain or markdown-like text" )
205
205
}
206
206
207
- // we can't just write to os.Stdout directly since we have multiple goroutine
208
- // all writing at the same time causing broken output.
207
+ // We can't just write to os.Stdout directly
208
+ // since we have multiple goroutine all writing at the same time causing broken output.
209
209
// Log is routine safe.
210
- // we see it, so it doesn't use a prefix or include a time stamp.
210
+ // We see it, so it doesn't use a prefix or include a time stamp.
211
211
switch {
212
212
case * quietFlag || * outFlag == os .DevNull :
213
213
stdout = log .New (io .Discard , "" , 0 )
@@ -274,27 +274,26 @@ func main() {
274
274
275
275
// stdin/stdout
276
276
if len (args ) == 0 {
277
- // if we are working with pipes/stdin/stdout
278
- // there is no concurrency, so we can directly
279
- // send data to the writers
277
+ // If we are working with pipes/stdin/stdout there is no concurrency,
278
+ // so we can directly send data to the writers.
280
279
var fileout io.Writer
281
280
var errout io.Writer
282
281
switch * writeit {
283
282
case true :
284
- // if we ARE writing the corrected stream
285
- // the corrected stream goes to stdout
286
- // and the misspelling errors goes to stderr
283
+ // If we are writing the corrected stream,
284
+ // the corrected stream goes to stdout,
285
+ // and the misspelling errors goes to stderr,
287
286
// so we can do something like this:
288
- // curl something | misspell -w | gzip > afile.gz
287
+ // curl something | misspell -w | gzip > afile.gz
289
288
fileout = os .Stdout
290
289
errout = os .Stderr
291
290
case false :
292
- // if we are not writing out the corrected stream
293
- // then work just like files. Misspelling errors
294
- // are sent to stdout
291
+ // If we are not writing out the corrected stream then work just like files.
292
+ // Misspelling errors are sent to stdout.
295
293
fileout = io .Discard
296
294
errout = os .Stdout
297
295
}
296
+
298
297
count := 0
299
298
next := func (diff misspell.Diff ) {
300
299
count ++
0 commit comments