From a30aabf297ed02785e57781e8a14393c08115ae3 Mon Sep 17 00:00:00 2001 From: xpetit <32063953+xpetit@users.noreply.github.com> Date: Sun, 4 Apr 2021 20:11:11 +0200 Subject: [PATCH] Formatting --- go/tests/func/activebits_test/main.go | 2 +- go/tests/func/convertbase_test/main.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/go/tests/func/activebits_test/main.go b/go/tests/func/activebits_test/main.go index ab5d1fe4..0b9d204f 100644 --- a/go/tests/func/activebits_test/main.go +++ b/go/tests/func/activebits_test/main.go @@ -8,7 +8,7 @@ import ( // Function that return the number of active bits in the number passed as the argument func activeBits(n int) (total int) { - for ; n > 1; n = n / 2 { + for ; n > 1; n /= 2 { total += n % 2 } total += n diff --git a/go/tests/func/convertbase_test/main.go b/go/tests/func/convertbase_test/main.go index e6e86689..9acd0659 100644 --- a/go/tests/func/convertbase_test/main.go +++ b/go/tests/func/convertbase_test/main.go @@ -13,7 +13,7 @@ func convertNbrBase(n int, base string) string { for n >= length { result = string(base[(n%length)]) + result - n = n / length + n /= length } result = string(base[n]) + result @@ -51,8 +51,8 @@ func main() { table = append(table, node{ nbr: "101011", baseFrom: "01", - baseTo: "0123456789"}, - ) + baseTo: "0123456789", + }) for _, arg := range table { lib.Challenge("ConvertBase", student.ConvertBase, convertBase, arg.nbr, arg.baseFrom, arg.baseTo)