Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/progress-download/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ func main() {
}
defer resp.Body.Close() // nolint:errcheck

// Don't add TUI if the header doesn't include content size
// it's impossible see progress without total
// Don't add TUI if the header doesn't include content size, since it's
// impossible to show progress without a total.
Comment on lines +69 to +70
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These comment lines are indented one level deeper than the surrounding code in main(). This will likely be flagged by the repo’s formatting checks (gofumpt/goimports enabled in .golangci.yml); please align the indentation (or run the configured formatter) so the comment sits at the same indent level as the following if statement.

Suggested change
// Don't add TUI if the header doesn't include content size, since it's
// impossible to show progress without a total.
// Don't add TUI if the header doesn't include content size, since it's
// impossible to show progress without a total.

Copilot uses AI. Check for mistakes.
if resp.ContentLength <= 0 {
fmt.Println("can't parse content length, aborting download")
os.Exit(1)
Expand Down
Loading