Commit bf9dafc

mo khan <mo@mokhan.ca>
2024-06-05 17:07:38
Use mage as build system
1 parent 197da83
go.mod
@@ -3,6 +3,7 @@ module gitlab.com/mokhax/stanuki
 go 1.22
 
 require (
+	github.com/magefile/mage v1.15.0
 	github.com/stretchr/testify v1.8.0
 	github.com/xlgmokha/x v0.0.0-20221023040112-0610463739d1
 )
go.sum
@@ -3,6 +3,8 @@ 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/google/jsonapi v1.0.0 h1:qIGgO5Smu3yJmSs+QlvhQnrscdZfFhiV6S8ryJAglqU=
 github.com/google/jsonapi v1.0.0/go.mod h1:YYHiRPJT8ARXGER8In9VuLv4qvLfDmA9ULQqptbLE4s=
+github.com/magefile/mage v1.15.0 h1:BvGheCMAsG3bWUDbZ8AyXXpCNwU9u5CB6sM+HNb9HYg=
+github.com/magefile/mage v1.15.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A=
 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/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
magefile.go
@@ -0,0 +1,17 @@
+//go:build mage
+// +build mage
+
+package main
+
+import (
+	"github.com/magefile/mage/sh"
+)
+
+// Default target to run when none is specified
+// If not set, running mage will list available targets
+var Default = Test
+
+// Run the unit tests
+func Test() error {
+	return sh.RunV("go", "test", "-v", "./...")
+}