Skip to content

Commit

Permalink
Feat/modify readme (#30)
Browse files Browse the repository at this point in the history
* feat: modify readme

* refactor: error tag format

* fix: correct tag format in demo

* feat: update comment

* feat: update readme

* feat: add go reference

* feat: add go report

* feat: add code coverage

* feat: update readme

* feat: reference example

* feat: correct example code

* feat: correct example code

---------

Co-authored-by: Eyo Chen <[email protected]>
  • Loading branch information
eyo-chen and Eyo Chen authored Aug 25, 2024
1 parent 7a00af5 commit 39cf1d8
Show file tree
Hide file tree
Showing 3 changed files with 124 additions and 97 deletions.
2 changes: 1 addition & 1 deletion err.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ var (
errValueNotTheSameType = errors.New("value is not the same type")

// errTagFormat is the error representing that tag is in wrong format
errTagFormat = errors.New("tag is in wrong format. It should be gofacto:\"struct:<structName>,table:<TableName>,foreignField:<ForeignField>\"")
errTagFormat = errors.New("tag is in wrong format")

// errNotFoundAtTag is the error representing that not found at tag
errNotFoundAtTag = errors.New("not found at tag")
Expand Down
2 changes: 1 addition & 1 deletion helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func (f *Factory[T]) setNonZeroValues(v interface{}, ignoreFields []string) {
continue
}

// handle custom types
// handle db custom types
if f.db != nil {
if customValue, ok := f.db.GenCustomType(curField.Type); ok {
curVal.Set(reflect.ValueOf(customValue))
Expand Down
Loading

0 comments on commit 39cf1d8

Please sign in to comment.