Properly abstract deployment asset downlod

This commit is contained in:
2026-05-05 17:56:02 +02:00
parent 596e94794e
commit ce4ed9744b
4 changed files with 52 additions and 13 deletions
+18
View File
@@ -0,0 +1,18 @@
package gitprovider
import (
"fmt"
"strings"
)
func NewProvider(serverType, protocol, baseUrl string) (GitProvider, error) {
switch strings.ToLower(serverType) {
case "github":
return &GitHubProvider{
protocol: protocol,
baseUrl: baseUrl,
}, nil
default:
return nil, fmt.Errorf("unsupported git provider: %s", serverType)
}
}