func (c *Client) GetSession(id session.ID) (*session.Session, error) {
	// saving extra round-trip
	if err := id.Check(); err != nil {
		return nil, trace.Wrap(err)
	}
	out, err := c.Get(c.Endpoint("sessions", string(id)), url.Values{})
	if err != nil {
		return nil, trace.Wrap(err)
	}
	var sess *session.Session
	if err := json.Unmarshal(out.Bytes(), &sess); err != nil {
		return nil, trace.Wrap(err)
	}
	return sess, nil
}
// GetSession returns a session by ID
GetSession returns a session by ID
// GetSession returns a session by ID
func (c *Client) GetSession(id session.ID) (*session.Session, error) {
	if err := id.Check(); err != nil {
		return nil, trace.Wrap(err)
	}
	out, err := c.Get(c.Endpoint("sessions", string(id)), url.Values{})
	if err != nil {
		return nil, trace.Wrap(err)
	}
	var sess *session.Session
	if err := json.Unmarshal(out.Bytes(), &sess); err != nil {
		return nil, trace.Wrap(err)
	}
	return sess, nil
}
func ( c * Client ) GetSession ( id session . ID ) ( * session . Session , error ) { if err := id . Check ( ) ; err != nil { return nil , trace . Wrap ( err ) } out , err := c . Get ( c . Endpoint ( " " , string ( id ) ) , url . Values { } ) if err != nil { return nil , trace . Wrap ( err ) } var sess * session . Session if err := json . Unmarshal ( out . Bytes ( ) , & sess ) ; err != nil { return nil , trace . Wrap ( err ) } return sess , nil }
GetSession returns a session by ID
GetSession returns a session by ID
// saving extra round-trip