fix(go): apply indents in a communication case in a select statement

This commit is contained in:
Amaan Qureshi 2023-02-24 03:58:50 -05:00 committed by Stephan Seitz
parent 37e7af1619
commit a3213e3dd7
2 changed files with 17 additions and 0 deletions

View file

@ -6,6 +6,7 @@
(func_literal)
(literal_value)
(expression_case)
(communication_case)
(default_case)
(block)
(call_expression)

16
tests/indent/go/select.go Normal file
View file

@ -0,0 +1,16 @@
// issue #4248
package main
import (
"context"
"fmt"
)
func test(ch byte) {
ctx := context.TODO()
select {
case <-ctx.Done():
fmt.Println("indentation")
default:
}
}