code: func ResolveAndValidateContextPath(givenContextDir string) (string, error) {
  	absContextDir, err := filepath.Abs(givenContextDir)
  	if err != nil {
  		return "", errors.Errorf("unable to get absolute context directory of given context directory %q: %v", givenContextDir, err)
  	}
  
  	// The context dir might be a symbolic link, so follow it to the actual
  	// target directory.
  	//
  	// FIXME. We use isUNC (always false on non-Windows platforms) to workaround
  	// an issue in golang. On Windows, EvalSymLinks does not work on UNC file
  	// paths (those starting with \\). This hack means that when using links
  	// on UNC paths, they will not be followed.
  	if !isUNC(absContextDir) {
  		absContextDir, err = filepath.EvalSymlinks(absContextDir)
  		if err != nil {
  			return "", errors.Errorf("unable to evaluate symlinks in context path: %v", err)
  		}
  	}
  
  	stat, err := os.Lstat(absContextDir)
  	if err != nil {
  		return "", errors.Errorf("unable to stat context directory %q: %v", absContextDir, err)
  	}
  
  	if !stat.IsDir() {
  		return "", errors.Errorf("context must be a directory: %s", absContextDir)
  	}
  	return absContextDir, err
  }
docs: // ResolveAndValidateContextPath uses the given context directory for a `docker build`
  // and returns the absolute path to the context directory.