diff --git a/dummy.go b/dummy.go index 37baf39..ce81abc 100644 --- a/dummy.go +++ b/dummy.go @@ -6,6 +6,7 @@ package sandbox import ( "errors" + "log" _ "github.com/pion/transport/v3/test" // nolint ) @@ -17,3 +18,15 @@ var ErrDummy = errors.New("dummy") type PublicAPI struct { PublicMember int } + +// PublicFunc is a dummy public method. +func (p *PublicAPI) PublicFunc() { + log.Println("Running PublicAPI.PublicFunc") // nolint:forbidigo + log.Println("PublicAPI.PublicMember: ", p.PublicMember) // nolint:forbidigo + if p.PublicMember == 1 { + log.Println("PublicAPI.PublicMember is one") // nolint:forbidigo + } + if p.PublicMember != 1 { + log.Println("PublicAPI.PublicMember is not one") // nolint:forbidigo + } +} diff --git a/dummy_test.go b/dummy_test.go index 95ff4c9..a4d155d 100644 --- a/dummy_test.go +++ b/dummy_test.go @@ -10,4 +10,6 @@ import ( ) func TestDummy(*testing.T) { + p := &PublicAPI{} + p.PublicFunc() }