Semaphore/db_lib/GitClientFactory.go

23 lines
429 B
Go
Raw Normal View History

2023-09-23 17:12:35 +02:00
package db_lib
2023-03-06 06:48:03 +01:00
2023-03-12 21:45:46 +01:00
import "github.com/ansible-semaphore/semaphore/util"
2023-03-06 06:48:03 +01:00
func CreateDefaultGitClient() GitClient {
2023-07-23 16:18:02 +02:00
switch util.Config.GitClientId {
case util.GoGitClientId:
return CreateGoGitClient()
2023-07-23 16:18:02 +02:00
case util.CmdGitClientId:
return CreateCmdGitClient()
default:
2023-03-12 21:45:46 +01:00
return CreateCmdGitClient()
}
2023-03-06 06:48:03 +01:00
}
func CreateGoGitClient() GitClient {
return GoGitClient{}
}
func CreateCmdGitClient() GitClient {
return CmdGitClient{}
}