code: func (p *Protocol) UnmarshalText(text []byte) error {
  	protocolName := string(text)
  
  	switch strings.ToLower(protocolName) {
  	case "plain":
  		*p = ProtocolPlain
  	case "protobuf":
  		*p = ProtocolProtobuf
  	case "pickle":
  		*p = ProtocolPickle
  	default:
  		return fmt.Errorf("Unsupported protocol type %v, supported: %v", protocolName, supportedProtocols)
  	}
  	return nil
  }
docs: // UnmarshalText converts text from config file to a enum.