gobuilder is a library for create files, at this moment we are creating only from the design pattern Builder.
$ go install github.com/ffelipelimao/gobuilder@latest
gobuilder gen -n=Test -f=Foo-string,Bar-string
-
-n : Create a name to your mock builder struct ex: -n=Test
-
-f : Create a name the fields to your struct the fields are separated by "," for you to define a type for your field, you separate it by "-" ex: -f=Foo-string,Bar-string in this case Foo is the field and string is the type of this field
-
-d : Create the destination folder, he need start with ./
gobuilder gen -n=Test -f=Foo-string,Bar-string
With Pointer: use letter p
gobuilder gen -n=Test -f=Foo-pstring,Bar-string
With Array: use letter a
gobuilder gen -n=Test -f=Foo-astring,Bar-string
gobuilder -h
or
gobuilder gen -h
If you find an issue with this library, please report an issue. If you'd like, we welcome any contributions. Fork this library and submit a pull request.
Versions used with gobuilder must follow SemVer.