Skip to content

Commit

Permalink
Add GetProp to key type
Browse files Browse the repository at this point in the history
  • Loading branch information
bandreghetti committed Nov 24, 2020
1 parent 1ca2af9 commit 307fb47
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions assets/getProp.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,9 @@ func (a Asset) GetProp(propTag string) interface{} {
val, _ := a[propTag]
return val
}

// GetProp returns the prop value. It returns nil if it doesn't exist.
func (k Key) GetProp(propTag string) interface{} {
val, _ := k[propTag]
return val
}

0 comments on commit 307fb47

Please sign in to comment.