Skip to content

Commit

Permalink
fixup! Remove path from admission, more response helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
DirectXMan12 committed Feb 8, 2019
1 parent 12bbffc commit 0b22ecb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/webhook/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ func (s *Server) setDefaults() {
// Register marks the given webhook as being served at the given path.
// It panics if two hooks are registered on the same path.
func (s *Server) Register(path string, hook http.Handler) {
s.defaultingOnce.Do(s.setDefaults)
_, found := s.webhooks[path]
if found {
panic(fmt.Errorf("can't register duplicate path: %v", path))
Expand Down

0 comments on commit 0b22ecb

Please sign in to comment.