diff --git a/haha/go.mod b/haha/go.mod new file mode 100644 index 0000000..45317ae --- /dev/null +++ b/haha/go.mod @@ -0,0 +1,11 @@ +module www.zhao1012112796.top/testg/test_gitea_act/haha + +go 1.25.0 + +require github.com/stretchr/testify v1.10.0 + +require ( + github.com/davecgh/go-spew v1.1.1 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect +) diff --git a/haha/go.sum b/haha/go.sum new file mode 100644 index 0000000..713a0b4 --- /dev/null +++ b/haha/go.sum @@ -0,0 +1,10 @@ +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/haha/haha.go b/haha/haha.go new file mode 100644 index 0000000..215f36e --- /dev/null +++ b/haha/haha.go @@ -0,0 +1,5 @@ +package haha + +func Haha(x, y int) int { + return x + y + 1 +} diff --git a/haha/haha_test.go b/haha/haha_test.go new file mode 100644 index 0000000..b4d1f13 --- /dev/null +++ b/haha/haha_test.go @@ -0,0 +1,11 @@ +package haha + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestHaHa(t *testing.T) { + assert.Equal(t, Haha(1, 2), 4) +}