Skip to content

Commit

Permalink
CDPCP-12516 - clean up unused functions prior implementing dead code …
Browse files Browse the repository at this point in the history
…check
  • Loading branch information
gregito committed Jul 24, 2024
1 parent a42ba6d commit eb9b671
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 131 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ jobs:
- name: Go Coverage
uses: gwatts/[email protected]
with:
coverage-threshold: 32.0
coverage-threshold: 31.9
cover-pkg: ./...
ignore-pattern: |
/cdp-sdk-go/
Expand Down
13 changes: 2 additions & 11 deletions cdp-sdk-go/cdp/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,16 @@
package cdp

import (
"strings"

datahubmodels "github.com/cloudera/terraform-provider-cdp/cdp-sdk-go/gen/datahub/models"
datalakemodels "github.com/cloudera/terraform-provider-cdp/cdp-sdk-go/gen/datalake/models"
environmentsmodels "github.com/cloudera/terraform-provider-cdp/cdp-sdk-go/gen/environments/models"
iammodels "github.com/cloudera/terraform-provider-cdp/cdp-sdk-go/gen/iam/models"
mlmodels "github.com/cloudera/terraform-provider-cdp/cdp-sdk-go/gen/ml/models"
opdbmodels "github.com/cloudera/terraform-provider-cdp/cdp-sdk-go/gen/opdb/models"
"strings"
)

// These functions should be generated in the appropriate gen package in an errors module.

func IsIamError(err *iammodels.Error, code string, message string) bool {
return err.Code == code && strings.Contains(err.Message, message)
}

func IsEnvironmentsError(err *environmentsmodels.Error, code string, message string) bool {
return err.Code == code && strings.Contains(err.Message, message)
}
Expand All @@ -41,7 +36,3 @@ func IsDatahubError(err *datahubmodels.Error, code string, message string) bool
func IsDatabaseError(err *opdbmodels.Error, code string, message string) bool {
return err.Code == code && strings.Contains(err.Message, message)
}

func IsMlError(err *mlmodels.Error, code string, message string) bool {
return err.Code == code && strings.Contains(err.Message, message)
}
File renamed without changes.
30 changes: 0 additions & 30 deletions utils/file_reader.go

This file was deleted.

89 changes: 0 additions & 89 deletions utils/file_reader_test.go

This file was deleted.

File renamed without changes.
File renamed without changes.

0 comments on commit eb9b671

Please sign in to comment.