We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 63c7954 commit 1afba52Copy full SHA for 1afba52
module-path-main/go.mod
@@ -0,0 +1,3 @@
1
+module main
2
+
3
+go 1.20
module-path-main/pkg.go
@@ -0,0 +1,5 @@
+package main
+func Add(a, b int) int {
4
+ return a + b
5
+}
module-path-main/pkg_test.go
@@ -0,0 +1,12 @@
+import (
+ "testing"
+)
6
7
+func TestAdd(t *testing.T) {
8
+ n := Add(5, 6)
9
+ if n != 11 {
10
+ t.Errorf("want 11, got %d\n", n)
11
+ }
12
0 commit comments