Skip to content

Commit

Permalink
style: removed some whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
peterhirn committed Feb 16, 2024
1 parent d8ae97f commit 999cdcf
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ type Report struct {

func parseReport(reader io.Reader) (Report, error) {
report := &Report{}

err := json.NewDecoder(reader).Decode(report)
return *report, err
}
Expand All @@ -94,7 +93,6 @@ func getEnv(key, fallback string) string {
if value, ok := os.LookupEnv(key); ok {
return value
}

return fallback
}

Expand All @@ -104,10 +102,8 @@ func getEnvBool(key string, fallback bool) bool {
if err != nil {
return fallback
}

return result
}

return fallback
}

Expand All @@ -117,10 +113,8 @@ func getEnvInt64(key string, fallback int64) int64 {
if err != nil {
return fallback
}

return result
}

return fallback
}

Expand Down Expand Up @@ -162,7 +156,7 @@ func save(config Config, reader io.Reader) (io.Reader, error) {
}
defer out.Close()

/// NOTE: It seems `TeeReader` writes complete json even when parsing fails later.
/// NOTE: It seems `TeeReader` writes the complete stream even when parsing fails later.
/// This is probably only true for small payloads.
return io.TeeReader(reader, out), nil
}
Expand Down

0 comments on commit 999cdcf

Please sign in to comment.