Skip to content

Commit

Permalink
non exporting Config.get method
Browse files Browse the repository at this point in the history
  • Loading branch information
david-littlefarmer committed Oct 23, 2024
1 parent e0430b5 commit 3b822bf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions common.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ type UserStore interface {
// map[service]map[method]T
type Config[T any] map[string]map[string]T

// Get returns the config value for the given request.
func (c Config[T]) Get(r *rcpRequest) (v T, ok bool) {
// returns the config value for the given request.
func (c Config[T]) get(r *rcpRequest) (v T, ok bool) {
if c == nil {
return v, false
}
Expand Down
2 changes: 1 addition & 1 deletion middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ func AccessControl(acl Config[ACL], o *Options) func(next http.Handler) http.Han
return
}

acl, ok := acl.Get(req)
acl, ok := acl.get(req)
if !ok {
eh(r, w, proto.ErrUnauthorized.WithCausef("rpc method not found"))
return
Expand Down

0 comments on commit 3b822bf

Please sign in to comment.