joaom00 / go-orgeous

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

To generate a factory we should use the following command:

go run main.go -factory Property -fields Name:string,CreatedAt:string

Then find a file called PorpetyFactory and add your faker package, we highly recommend you to use faker.

To install the package:

go get -u github.com/go-faker/faker/v4

Fill the following code:

func NewProperty() *Property {
	return &Property{
		Name: faker.Name(),
	}
}

About


Languages

Language:Go 100.0%