code: func (r *Resolver) Resolve(ctx context.Context, file *ensure.File, expander template.Expander) (*ensure.ResolvedFile, error) {
  	return file.Resolve(func(pkg, ver string) (common.Pin, error) {
  		return r.ResolvePackage(ctx, pkg, ver)
  	}, expander)
  }
docs: // Resolve resolves versions of all packages in the ensure file using the
  // given expander to expand templates.
  //
  // Succeeds only if all packages have been successfully resolved and verified.
  //
  // Names of packages that failed the resolution are returned as part of the
  // multi-error.