code: func Register(group string, descriptor ErrorDescriptor) ErrorCode {
  	registerLock.Lock()
  	defer registerLock.Unlock()
  
  	descriptor.Code = ErrorCode(nextCode)
  
  	if _, ok := idToDescriptors[descriptor.Value]; ok {
  		panic(fmt.Sprintf("ErrorValue %q is already registered", descriptor.Value))
  	}
  	if _, ok := errorCodeToDescriptors[descriptor.Code]; ok {
  		panic(fmt.Sprintf("ErrorCode %v is already registered", descriptor.Code))
  	}
  
  	groupToDescriptors[group] = append(groupToDescriptors[group], descriptor)
  	errorCodeToDescriptors[descriptor.Code] = descriptor
  	idToDescriptors[descriptor.Value] = descriptor
  
  	nextCode++
  	return descriptor.Code
  }
docs: // Register will make the passed-in error known to the environment and
  // return a new ErrorCode