code: func validateContextDir(contextDir string) (string, error) {
  	absContextDir, err := filepath.Abs(contextDir)
  	if err != nil {
  		return "", err
  	}
  	stat, err := os.Lstat(absContextDir)
  	if err != nil {
  		return "", err
  	}
  
  	if !stat.IsDir() {
  		return "", errors.Errorf("context must be a directory")
  	}
  
  	return absContextDir, nil
  }
docs: // validateContextDir validates the given dir and returns abs path on success.