Skip to content

Commit 79edc0f

Browse files
committed
chore: format comments
1 parent 913a8c3 commit 79edc0f

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

cmd/misspell/main.go

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -204,10 +204,10 @@ func main() {
204204
log.Fatalf("Mode must be one of auto=guess, go=golang source, text=plain or markdown-like text")
205205
}
206206

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.
209209
// 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.
211211
switch {
212212
case *quietFlag || *outFlag == os.DevNull:
213213
stdout = log.New(io.Discard, "", 0)
@@ -274,27 +274,26 @@ func main() {
274274

275275
// stdin/stdout
276276
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.
280279
var fileout io.Writer
281280
var errout io.Writer
282281
switch *writeit {
283282
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,
287286
// so we can do something like this:
288-
// curl something | misspell -w | gzip > afile.gz
287+
// curl something | misspell -w | gzip > afile.gz
289288
fileout = os.Stdout
290289
errout = os.Stderr
291290
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.
295293
fileout = io.Discard
296294
errout = os.Stdout
297295
}
296+
298297
count := 0
299298
next := func(diff misspell.Diff) {
300299
count++

0 commit comments

Comments
 (0)