Skip to content

tristangoossens/testfilegenerator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Welcome to this Repository!

This is a small project of Jeremytjuh and Tristangoossens In this project we wanted to automatically generate the barebone test for a package

Why?

We thought it would be an interesting and perhaps useful project to make!

How to use our project??

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).

Examples

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.

alt text

Then once you are ready, run the program!

go run Generator.go

About

Used to generate barebone test files

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages