Skip to content
Merged
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
25 changes: 25 additions & 0 deletions challenge-1/submissions/lostzoo/solution-template.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package main

import (
"fmt"
)

func main() {
var a, b int
// Read two integers from standard input
_, err := fmt.Scanf("%d, %d", &a, &b)
if err != nil {
fmt.Println("Error reading input:", err)
return
}

// Call the Sum function and print the result
result := Sum(a, b)
fmt.Println(result)
}

// Sum returns the sum of a and b.
func Sum(a int, b int) int {
result := a + b
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Fix indentation: use tabs instead of spaces.

Line 23 uses spaces for indentation instead of tabs, which violates Go's formatting standards. Run go fmt on this file to automatically fix the indentation.

The line should use a tab character for indentation to comply with gofmt:

 func Sum(a int, b int) int {
-    result := a + b
+	result := a + b
 	return result
 }
🤖 Prompt for AI Agents
In challenge-1/submissions/lostzoo/solution-template.go around line 23, the
statement is indented with spaces ("    result := a + b") instead of a tab; run
`gofmt -w challenge-1/submissions/lostzoo/solution-template.go` (or replace the
leading spaces with a single tab) to correct the indentation so the file
conforms to Go formatting.

return result
}
Loading