gobuilder

command module
v0.0.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 22, 2022 License: MIT Imports: 1 Imported by: 0

README

Generate builders for Go

GoDoc

gobuilder is a library for create files, at this moment we are creating only from the design pattern Builder.

Builder Design Pattern

Installation

$ go install github.com/ffelipelimao/gobuilder@latest

Usage

Create a builder file
gobuilder gen -n=Test -f=Foo-string,Bar-string
Command Line syntax flag
  • -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 ./

Examples

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

Help commands

gobuilder -h

or

gobuilder gen -h

Issues and Contributing

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.

License

MIT

Documentation

Overview

Copyright © 2022 @ffelipelimao

Directories

Path Synopsis
cmd
gen

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL