Skip to content

Commit

Permalink
Refactor commatrix creation from file function name
Browse files Browse the repository at this point in the history
  • Loading branch information
shirmoran committed Jul 23, 2024
1 parent 17e6c91 commit 15a8634
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions commatrix/commatrix.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func New(kubeconfigPath string, customEntriesPath string, customEntriesFormat st
if err != nil {
return nil, fmt.Errorf("failed adding custom entries: %s", err)
}
customComDetails, err := AddFromFile(customEntriesPath, inputFormat)
customComDetails, err := GetComDetailsListFromFile(customEntriesPath, inputFormat)
if err != nil {
return nil, fmt.Errorf("failed adding custom entries: %s", err)
}
Expand All @@ -81,7 +81,7 @@ func New(kubeconfigPath string, customEntriesPath string, customEntriesFormat st
return &types.ComMatrix{Matrix: cleanedComDetails}, nil
}

func AddFromFile(fp string, format types.Format) ([]types.ComDetails, error) {
func GetComDetailsListFromFile(fp string, format types.Format) ([]types.ComDetails, error) {
var res []types.ComDetails
f, err := os.Open(filepath.Clean(fp))
if err != nil {
Expand Down

0 comments on commit 15a8634

Please sign in to comment.