Skip to content

Commit eb0f692

Browse files
using filepath instead of path
1 parent a578949 commit eb0f692

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

pkg/analyze/deployment_status.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ package analyzer
33
import (
44
"encoding/json"
55
"fmt"
6-
"path"
6+
"path/filepath"
77

88
"github.com/pkg/errors"
99
troubleshootv1beta2 "github.com/replicatedhq/troubleshoot/pkg/apis/troubleshoot/v1beta2"
1010
appsv1 "k8s.io/api/apps/v1"
1111
)
1212

1313
func analyzeDeploymentStatus(analyzer *troubleshootv1beta2.DeploymentStatus, getCollectedFileContents func(string) ([]byte, error)) (*AnalyzeResult, error) {
14-
collected, err := getCollectedFileContents(path.Join("cluster-resources", "deployments", fmt.Sprintf("%s.json", analyzer.Namespace)))
14+
collected, err := getCollectedFileContents(filepath.Join("cluster-resources", "deployments", fmt.Sprintf("%s.json", analyzer.Namespace)))
1515
if err != nil {
1616
return nil, errors.Wrap(err, "failed to read collected deployments from namespace")
1717
}

pkg/analyze/ingress.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ package analyzer
33
import (
44
"encoding/json"
55
"fmt"
6-
"path"
6+
"path/filepath"
77

88
troubleshootv1beta2 "github.com/replicatedhq/troubleshoot/pkg/apis/troubleshoot/v1beta2"
99
extensionsv1beta1 "k8s.io/api/extensions/v1beta1"
1010
)
1111

1212
func analyzeIngress(analyzer *troubleshootv1beta2.Ingress, getCollectedFileContents func(string) ([]byte, error)) (*AnalyzeResult, error) {
13-
ingressData, err := getCollectedFileContents(path.Join("cluster-resources", "ingress", fmt.Sprintf("%s.json", analyzer.Namespace)))
13+
ingressData, err := getCollectedFileContents(filepath.Join("cluster-resources", "ingress", fmt.Sprintf("%s.json", analyzer.Namespace)))
1414
if err != nil {
1515
return nil, err
1616
}

pkg/analyze/statefulset_status.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ package analyzer
33
import (
44
"encoding/json"
55
"fmt"
6-
"path"
6+
"path/filepath"
77

88
"github.com/pkg/errors"
99
troubleshootv1beta2 "github.com/replicatedhq/troubleshoot/pkg/apis/troubleshoot/v1beta2"
1010
appsv1 "k8s.io/api/apps/v1"
1111
)
1212

1313
func analyzeStatefulsetStatus(analyzer *troubleshootv1beta2.StatefulsetStatus, getCollectedFileContents func(string) ([]byte, error)) (*AnalyzeResult, error) {
14-
collected, err := getCollectedFileContents(path.Join("cluster-resources", "statefulsets", fmt.Sprintf("%s.json", analyzer.Namespace)))
14+
collected, err := getCollectedFileContents(filepath.Join("cluster-resources", "statefulsets", fmt.Sprintf("%s.json", analyzer.Namespace)))
1515
if err != nil {
1616
return nil, errors.Wrap(err, "failed to read collected statefulsets from namespace")
1717
}

0 commit comments

Comments
 (0)