code: func unmarshal(packet []byte) (interface{}, error) {
  	if len(packet) < 1 {
  		return nil, errors.New("agent: empty packet")
  	}
  	var msg interface{}
  	switch packet[0] {
  	case agentFailure:
  		return new(failureAgentMsg), nil
  	case agentSuccess:
  		return new(successAgentMsg), nil
  	case agentIdentitiesAnswer:
  		msg = new(identitiesAnswerAgentMsg)
  	case agentSignResponse:
  		msg = new(signResponseAgentMsg)
  	default:
  		return nil, fmt.Errorf("agent: unknown type tag %d", packet[0])
  	}
  	if err := ssh.Unmarshal(packet, msg); err != nil {
  		return nil, err
  	}
  	return msg, nil
  }
docs: // unmarshal parses an agent message in packet, returning the parsed
  // form and the message type of packet.