api/http/handler/edgestacks/edgestack_create_git.go
Method Handler.storeManifestFromGitRepository
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
func (handler *Handler) storeManifestFromGitRepository(tx dataservices.DataStoreTx, stackFolder string, relatedEndpointIds []portainer.EndpointID, deploymentType portainer.EdgeStackDeploymentType, currentUserID portainer.UserID, repositoryConfig gittypes.RepoConfig) (composePath, manifestPath, projectPath string, err error) {
Method edgeStackFromGitRepositoryPayload.Validate
has 6 return statements (exceeds 4 allowed). Open
Open
func (payload *edgeStackFromGitRepositoryPayload) Validate(r *http.Request) error {
if govalidator.IsNull(payload.Name) {
return httperrors.NewInvalidPayloadError("Invalid stack name")
}
Method Handler.storeManifestFromGitRepository
has 6 return statements (exceeds 4 allowed). Open
Open
func (handler *Handler) storeManifestFromGitRepository(tx dataservices.DataStoreTx, stackFolder string, relatedEndpointIds []portainer.EndpointID, deploymentType portainer.EdgeStackDeploymentType, currentUserID portainer.UserID, repositoryConfig gittypes.RepoConfig) (composePath, manifestPath, projectPath string, err error) {
hasWrongType, err := hasWrongEnvironmentType(tx.Endpoint(), relatedEndpointIds, deploymentType)
if err != nil {
return "", "", "", fmt.Errorf("unable to check for existence of non fitting environments: %w", err)
}