forked from p93542168/wheat-cache
test
This commit is contained in:
parent
6abf4255d7
commit
f8f653c6f9
1
go.mod
1
go.mod
|
@ -5,4 +5,5 @@ go 1.16
|
|||
require (
|
||||
github.com/spf13/cobra v1.2.1
|
||||
github.com/spf13/viper v1.8.1
|
||||
github.com/stretchr/testify v1.7.0
|
||||
)
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
package test
|
||||
|
||||
func Hello(str string) (bool, error) {
|
||||
return str == "Nice", nil
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
package test
|
||||
|
||||
import (
|
||||
"github.com/stretchr/testify/require"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestHello(t *testing.T) {
|
||||
_, err := Hello("Nice")
|
||||
require.NoError(t, err)
|
||||
}
|
Loading…
Reference in New Issue