code: func registerRestorer(msg structs.MessageType, fn restorer) {
  	if restorers == nil {
  		restorers = make(map[structs.MessageType]restorer)
  	}
  	if restorers[msg] != nil {
  		panic(fmt.Errorf("Message %d is already registered", msg))
  	}
  	restorers[msg] = fn
  }
docs: // registerRestorer adds a new helper. This should be called at package
  // init() time.