Golang show that I have only 50% of covering code, and as I see code in main is not covered, I've tried to search but not found anything with explanations how to cover code in main.
main.go
package main
func Sum(x int, y int) int {
return x + y
}
func main() {
Sum(5, 5)
}
main_test.go
package main
import (
"testing"
)
func TestSum(t *testing.T) {
total := Sum(5, 5)
if total != 10 {
t.Fail()
}
}