From 15a86340acf31aa769d9170a2c219f8a566be22c Mon Sep 17 00:00:00 2001 From: Shir Moran Date: Tue, 23 Jul 2024 14:30:13 +0300 Subject: [PATCH] Refactor commatrix creation from file function name --- commatrix/commatrix.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commatrix/commatrix.go b/commatrix/commatrix.go index 4f60e82d..c4bef690 100644 --- a/commatrix/commatrix.go +++ b/commatrix/commatrix.go @@ -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) } @@ -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 {