diff --git a/backend/src/auth/password.go b/backend/src/auth/password.go index 0af50d6c7..d27831176 100644 --- a/backend/src/auth/password.go +++ b/backend/src/auth/password.go @@ -81,7 +81,6 @@ func decodeHash(encodedHash string) (p *params, salt []byte, hash []byte, err er var version int _, err = fmt.Sscanf(vals[2], "v=%d", &version) - if err != nil { return nil, nil, nil, err } @@ -93,13 +92,11 @@ func decodeHash(encodedHash string) (p *params, salt []byte, hash []byte, err er p = ¶ms{} _, err = fmt.Sscanf(vals[3], "m=%d,t=%d,p=%d", &p.memory, &p.iterations, &p.parallelism) - if err != nil { return nil, nil, nil, err } salt, err = base64.RawStdEncoding.Strict().DecodeString(vals[4]) - if err != nil { return nil, nil, nil, err } @@ -107,7 +104,6 @@ func decodeHash(encodedHash string) (p *params, salt []byte, hash []byte, err er p.saltLength = uint32(len(salt)) hash, err = base64.RawStdEncoding.Strict().DecodeString(vals[5]) - if err != nil { return nil, nil, nil, err } diff --git a/cli/commands/format.go b/cli/commands/format.go index 57799e693..60f6e35f5 100644 --- a/cli/commands/format.go +++ b/cli/commands/format.go @@ -76,7 +76,7 @@ func Format(folder string, runFrontend bool, runBackend bool) error { func BackendFormat() error { fmt.Println("Formatting backend") - cmd := exec.Command("go", "fmt", "./...") + cmd := exec.Command("gofumpt", "-l", "-w", ".") cmd.Dir = BACKEND_DIR err := cmd.Run()