Skip to content

Commit

Permalink
chore(release): bumped version to v1.2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
whatwewant committed Dec 28, 2023
1 parent cddd0eb commit 0df5200
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 15 deletions.
2 changes: 1 addition & 1 deletion datasource/datasource.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ type DataSource interface {
// - Get("port")
// - Get("redis.port")
// - Get("address.city.houses.0.id")
Get(key string) (any, error)
Get(key string) any
}
4 changes: 2 additions & 2 deletions datasource/map.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ func NewMapDataSource(data map[string]any) DataSource {
// - Get("port")
// - Get("redis.port")
// - Get("address.city.houses.0.id")
func (m *mapDataSource) Get(key string) (any, error) {
return object.Get(m.data, key), nil
func (m *mapDataSource) Get(key string) any {
return object.Get(m.data, key)
}
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ module github.com/go-zoox/tag

go 1.18

require github.com/go-zoox/core-utils v1.3.4
require github.com/go-zoox/core-utils v1.3.5

require github.com/spf13/cast v1.5.0 // indirect
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE=
github.com/go-zoox/core-utils v1.3.4 h1:qfapS7+tNWIz0TDyAICfdeIL2QLS1iJ8+mZWq4NInbE=
github.com/go-zoox/core-utils v1.3.4/go.mod h1:raOOwr2l2sJQyjR0Dg33sg0ry4U1/L2eNTuLFRpUXWs=
github.com/go-zoox/core-utils v1.3.5 h1:uxnPjUdo20ZCYCJp+1deuoqdMByTTJxQFrMp8e5ty+E=
github.com/go-zoox/core-utils v1.3.5/go.mod h1:raOOwr2l2sJQyjR0Dg33sg0ry4U1/L2eNTuLFRpUXWs=
github.com/go-zoox/testify v1.0.2 h1:G5sQ3xm0uwCuytnMhgnqZ5BItCt2DN3n2wLBqlIJEWA=
github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o=
github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0=
Expand Down
7 changes: 1 addition & 6 deletions tag.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,7 @@ func (t *Tag) decodeR(ptr interface{}, keyPathParent string) error {

attribute := attribute.New(rtt.Name, rtt.Type.String(), keyPathParent, rtt.Tag.Get(tagName))
// fmt.Println("keyPathParent:", keyPathParent, rtt.Name, attribute.GetKey())
v, err := dataSource.Get(attribute.GetKey())
if err != nil {
return err
}

if err := attribute.SetValue(v); err != nil {
if err := attribute.SetValue(dataSource.Get(attribute.GetKey())); err != nil {
return err
}

Expand Down
4 changes: 2 additions & 2 deletions tag_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ var TestStructDataSourceData = map[string]interface{}{
"type_transform": "666",
}

func (t *TestStructDataSource) Get(key string) (interface{}, error) {
return object.Get(TestStructDataSourceData, key), nil
func (t *TestStructDataSource) Get(key string) any {
return object.Get(TestStructDataSourceData, key)
}

func TestTag(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion version.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package tag

// Version is the version of tag.
var Version = "1.2.5"
var Version = "1.2.6"

0 comments on commit 0df5200

Please sign in to comment.