feat: add import support and unit tests for provider resources

This commit is contained in:
Naeel
2026-04-14 23:00:46 +03:00
parent a2688e5f2c
commit 81852c28b1
12 changed files with 366 additions and 0 deletions
@@ -0,0 +1,16 @@
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
}