Skip to content

Generate a test skeleton for a go file.

Notifications You must be signed in to change notification settings

tomasruud/go-test-skeleton

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Go Test Skeleton

Install

go install github.com/tomasruud/go-test-skeleton

Run

go-test-skeleton <file>

Example

Given the source file looks like this:

// file: foo.go
package foo

type bar struct {}

func (_ bar) hi() {}
func (_ bar) Bye() {}

func doFoo() {}
func DoBar() {}

The output should look something like this:

func TestBarHi(t *testing.T) {
  t.Skip("not implemented")
}

func TestBarBye(t *testing.T) {
  t.Skip("not implemented")
}

func TestDoFoo(t *testing.T) {
  t.Skip("not implemented")
}

func TestDoBar(t *testing.T) {
  t.Skip("not implemented")
}

About

Generate a test skeleton for a go file.

Resources

Stars

Watchers

Forks

Languages