Files
fission-console/terraform/provider/internal/resources/import_helpers.go
T

17 lines
423 B
Go

package resources
import (
"fmt"
"strings"
)
// parseImportID разбирает импорт в формате namespace/name.
func parseImportID(importID string) (string, string, error) {
parts := strings.Split(importID, "/")
if len(parts) != 2 || parts[0] == "" || parts[1] == "" {
return "", "", fmt.Errorf("invalid import id %q, expected format namespace/name", importID)
}
return parts[0], parts[1], nil
}