Skip to content

Commit

Permalink
Rename CreateParams to CreateAttributes
Browse files Browse the repository at this point in the history
  • Loading branch information
minhduc140583 committed Sep 14, 2024
1 parent b82e11b commit 7dc7888
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
3 changes: 0 additions & 3 deletions go.mod

This file was deleted.

Empty file removed go.sum
Empty file.
6 changes: 3 additions & 3 deletions handler_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,10 @@ type Parameters struct {
}

func CreateParameters(filterType reflect.Type, modelType reflect.Type) *Parameters {
paramIndex, filterIndex, firstLayerIndexes, _ := CreateParams(filterType, modelType)
paramIndex, filterIndex, firstLayerIndexes, _ := CreateAttributes(filterType, modelType)
return &Parameters{ParamIndex: paramIndex, FilterIndex: filterIndex, CSVIndex: firstLayerIndexes}
}
func CreateParams(filterType reflect.Type, modelType reflect.Type, opts ...string) (map[string]int, int, map[string]int, map[string]int) {
func CreateAttributes(filterType reflect.Type, modelType reflect.Type, opts ...string) (map[string]int, int, map[string]int, map[string]int) {
embedField := ""
if len(opts) > 0 {
embedField = opts[0]
Expand All @@ -204,7 +204,7 @@ func CreateParams(filterType reflect.Type, modelType reflect.Type, opts ...strin
firstLayerIndexes, secondLayerIndexes := BuildJsonMap(model, fields, embedField)
return paramIndex, filterIndex, firstLayerIndexes, secondLayerIndexes
}
func BuildParams(filterType reflect.Type) (map[string]int, int) {
func BuildAttributes(filterType reflect.Type) (map[string]int, int) {
paramIndex := BuildParamIndex(filterType)
filterIndex := FindFilterIndex(filterType)
return paramIndex, filterIndex
Expand Down

0 comments on commit 7dc7888

Please sign in to comment.