This is a small project of Jeremytjuh and Tristangoossens In this project we wanted to automatically generate the barebone test for a package
We thought it would be an interesting and perhaps useful project to make!
To start off, you will need a package. This package can contain any functions which are exportable(function names should start with a capital letter).
Correct example
package example
import (
"fmt"
)
func Test() {
fmt.Println(1+1)
}
Incorrect example
package main // Package cannot be main
import (
"fmt"
)
func test() { // This function is not exportable
fmt.Println(1+1)
}
Then make sure you have our generator.go file located in the generator directory inside of your package directory.
After importing this project into your files open generator.go, scroll down into func main and enter your package file between the parentheses.
Then once you are ready, run the program!
go run Generator.go