Skip to content
This repository was archived by the owner on Aug 6, 2021. It is now read-only.

Commit dc4b5cf

Browse files
author
pilillo
committed
added asset type to db and table asset builders
1 parent 548ae8e commit dc4b5cf

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

abstract/db_asset.go

+6-2
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ type databaseBuilder struct{ asset Asset }
4444

4545
// NewDatabaseBuilder ... builder for a database asset type
4646
func NewDatabaseBuilder() *databaseBuilder {
47-
return &databaseBuilder{}
47+
builder := &databaseBuilder{}
48+
builder.asset.Type = _Database
49+
return builder
4850
}
4951

5052
func (b *databaseBuilder) SetName(name string) *databaseBuilder {
@@ -72,7 +74,9 @@ type tableBuilder struct{ asset Asset }
7274

7375
// NewTableBuilder ... table builder
7476
func NewTableBuilder() *tableBuilder {
75-
return &tableBuilder{}
77+
builder := &tableBuilder{}
78+
builder.asset.Type = _Table
79+
return builder
7680
}
7781

7882
func (b *tableBuilder) SetName(name string) *tableBuilder {

0 commit comments

Comments
 (0)