code: func LoadEnsureFile(path string) (*File, error) {
  	var f io.ReadCloser
  	var basePath string
  	if path == "-" {
  		var err error
  		if basePath, err = os.Getwd(); err != nil {
  			return nil, err
  		}
  		f = os.Stdin
  	} else {
  		abs, err := filepath.Abs(path)
  		if err != nil {
  			return nil, err
  		}
  		basePath = filepath.Dir(abs)
  		if f, err = os.Open(path); err != nil {
  			return nil, err
  		}
  		defer f.Close()
  	}
  
  	pf, err := ParseFile(f)
  	if err != nil {
  		return nil, err
  	}
  
  	if pf.ResolvedVersions != "" {
  		pf.ResolvedVersions = filepath.FromSlash(pf.ResolvedVersions)
  		if !filepath.IsAbs(pf.ResolvedVersions) {
  			pf.ResolvedVersions = filepath.Join(basePath, pf.ResolvedVersions)
  		}
  	}
  
  	return pf, nil
  }
docs: // LoadEnsureFile loads the ensure file from the given path or stdin (if 'path'
  // is "-").
  //
  // If the ensure file has $ResolvedVersions directive, the returned File will
  // have ResolvedVersions field set to an absolute path to the resolved versions
  // file. Its presence or correctness is not checked.