code: func (cmd *TargetCommand) setSpace() error {
  	if !cmd.Config.HasTargetedOrganization() {
  		return translatableerror.NoOrganizationTargetedError{BinaryName: cmd.Config.BinaryName()}
  	}
  
  	space, warnings, err := cmd.Actor.GetSpaceByOrganizationAndName(cmd.Config.TargetedOrganization().GUID, cmd.Space)
  	cmd.UI.DisplayWarnings(warnings)
  	if err != nil {
  		return err
  	}
  
  	cmd.Config.SetSpaceInformation(space.GUID, space.Name, space.AllowSSH)
  
  	return nil
  }
docs: // setSpace sets space