import ( . "gopkg.in/check.v1" ) func (s *MySuite) TestAssertEqual(c *C) { foo1 := "Hello" foo2 := "Hello" c.Assert(foo1, Equals, foo2) }
import ( . "gopkg.in/check.v1" ) func (s *MySuite) TestAssertNil(c *C) { var foo *string c.Assert(foo, IsNil) }
import ( . "gopkg.in/check.v1" ) func TestAssertPanics(c *C) { c.Assert(func() { somePanicFunction() }, Panics, "Expected panic") }Overall, the gopkg.in.check.v1 package library is a reliable and easy-to-use testing tool for the Go programming language.