code: func (r *Reader) ReadPlan() (*plans.Plan, error) {
  	var planFile *zip.File
  	for _, file := range r.zip.File {
  		if file.Name == tfplanFilename {
  			planFile = file
  			break
  		}
  	}
  	if planFile == nil {
  		// This should never happen because we checked for this file during
  		// Open, but we'll check anyway to be safe.
  		return nil, fmt.Errorf("the plan file is invalid")
  	}
  
  	pr, err := planFile.Open()
  	if err != nil {
  		return nil, fmt.Errorf("failed to retrieve plan from plan file: %s", err)
  	}
  	defer pr.Close()
  
  	return readTfplan(pr)
  }
docs: // ReadPlan reads the plan embedded in the plan file.
  //
  // Errors can be returned for various reasons, including if the plan file
  // is not of an appropriate format version, if it was created by a different
  // version of Terraform, if it is invalid, etc.