Skip to content

Commit

Permalink
fix: style
Browse files Browse the repository at this point in the history
  • Loading branch information
Gogomoe committed Jun 5, 2024
1 parent e630160 commit ef75f51
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions eris.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func GetKVs(err error) map[string]any {
return kvErr.KVs()
}

// GetProperty returns the property. If the property doesn't exist or type doesn't match, returns T{}, false
// GetProperty returns the property. If the property doesn't exist or type doesn't match, returns T{}, false.
func GetProperty[T any](err error, key string) (T, bool) {
val, ok := GetKVs(err)[key]
if !ok {
Expand All @@ -60,7 +60,7 @@ func GetProperty[T any](err error, key string) (T, bool) {
return typed, true
}

// GetPropertyP returns the property pointer. If the property doesn't exist or type doesn't match, returns nil
// GetPropertyP returns the property pointer. If the property doesn't exist or type doesn't match, returns nil.
func GetPropertyP[T any](err error, key string) *T {
val, ok := GetKVs(err)[key]
if !ok {
Expand Down

0 comments on commit ef75f51

Please sign in to comment.