code: func parseRawPath(rawPath string) (*pathexp.PathExp, *string, error) {
  	idx := strings.LastIndex(rawPath, "/")
  	if idx == -1 {
  		return nil, nil, errs.NewExitError("resource path format is incorrect.")
  	}
  	secret := rawPath[idx+1:]
  	path := rawPath[:idx]
  
  	if secret == "**" {
  		path = rawPath
  		secret = "*"
  	}
  
  	// Ensure that the secret name is valid
  	if !pathexp.ValidSecret(secret) {
  		return nil, nil, errs.NewExitError("Invalid secret name " + secret)
  	}
  
  	pe, err := parsePathExp(path)
  	if err != nil {
  		return nil, nil, errs.NewErrorExitError("Invalid path expression", err)
  	}
  	return pe, &secret, nil
  }
docs: // parseRawPath parses and validates a raw path, possibly including a secret.
  // The secret portion is also validated.