From a9b910bb0485e0f27a39f5c09302795b70a1886e Mon Sep 17 00:00:00 2001 From: avkochemasov Date: Tue, 15 Oct 2024 09:39:28 +0200 Subject: [PATCH 1/2] Format code in example --- modules/10-basics/65-const/ru/README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/10-basics/65-const/ru/README.md b/modules/10-basics/65-const/ru/README.md index aaa5793..f00edff 100644 --- a/modules/10-basics/65-const/ru/README.md +++ b/modules/10-basics/65-const/ru/README.md @@ -82,14 +82,14 @@ const ( ) const ( -a = iota -b = 42 -c = iota -d + a = iota + b = 42 + c = iota + d ) func main() { -fmt.Println(zero, one, two, three) // 0 1 2 3 -fmt.Println(a, b, c, d) // 0 42 2 3 + fmt.Println(zero, one, two, three) // 0 1 2 3 + fmt.Println(a, b, c, d) // 0 42 2 3 } ``` From 556a32e78d4f7c5c6e6bd4be517d9eb87b1b457e Mon Sep 17 00:00:00 2001 From: avkochemasov Date: Tue, 15 Oct 2024 09:50:37 +0200 Subject: [PATCH 2/2] Format code solution within the Constants block --- modules/10-basics/65-const/solution.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/10-basics/65-const/solution.go b/modules/10-basics/65-const/solution.go index e9f3dd2..2d74bd7 100644 --- a/modules/10-basics/65-const/solution.go +++ b/modules/10-basics/65-const/solution.go @@ -18,10 +18,10 @@ const ( // ErrorMessageToCode returns a gRPC error code depending on error message. func ErrorMessageToCode(msg string) int { switch msg { - case OkMsg: - return OkCode - case CancelledMsg: - return CancelledCode + case OkMsg: + return OkCode + case CancelledMsg: + return CancelledCode } return UnknownCode