Skip to content

Commit

Permalink
unexport url attributes field
Browse files Browse the repository at this point in the history
  • Loading branch information
chickenlj committed Aug 24, 2023
1 parent 4e52f14 commit 4fdf50b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions common/url.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,17 +116,17 @@ type URL struct {
Methods []string
// special for registry
SubURL *URL
Attributes sync.Map `json:"-" hessian:"-"`
attributes sync.Map
}

func (c *URL) AddAttribute(key string, value interface{}) {
if value != nil {
c.Attributes.Store(key, value)
c.attributes.Store(key, value)
}
}

func (c *URL) GetAttribute(key string) interface{} {
v, _ := c.Attributes.Load(key)
v, _ := c.attributes.Load(key)
return v
}

Expand Down

0 comments on commit 4fdf50b

Please sign in to comment.