code: func registerEndpoint(pattern string, methods []string, fn unboundEndpoint) {
  	if endpoints == nil {
  		endpoints = make(map[string]unboundEndpoint)
  	}
  	if endpoints[pattern] != nil || allowedMethods[pattern] != nil {
  		panic(fmt.Errorf("Pattern %q is already registered", pattern))
  	}
  
  	endpoints[pattern] = fn
  	allowedMethods[pattern] = methods
  }
docs: // registerEndpoint registers a new endpoint, which should be done at package
  // init() time.