Skip to content

Commit 22acd07

Browse files
committed
fix: remove hardcoded references to 'nic'
1 parent 5b25bb0 commit 22acd07

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/data_collector/data_collector.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@ type DataCollector struct {
5959

6060
func NewDataCollector(namespaces ...string) (*DataCollector, error) {
6161

62-
tmpDir, err := os.MkdirTemp("", "nic-diag")
62+
tmpDir, err := os.MkdirTemp("", "-pkg-diag")
6363
if err != nil {
6464
return nil, fmt.Errorf("unable to create temp directory: %s", err)
6565
}
6666

67-
logFile, err := os.OpenFile(filepath.Join(tmpDir, "nic-supportpkg.log"), os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644)
67+
logFile, err := os.OpenFile(filepath.Join(tmpDir, "supportpkg.log"), os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644)
6868
if err != nil {
6969
return nil, fmt.Errorf("unable to create log file: %s", err)
7070
}
@@ -108,7 +108,7 @@ func (c *DataCollector) WrapUp(product string) (string, error) {
108108
unixTime := time.Now().Unix()
109109
unixTimeString := strconv.FormatInt(unixTime, 10)
110110
tarballName := fmt.Sprintf("%s-supportpkg-%s.tar.gz", product, unixTimeString)
111-
tarballRootDirName := fmt.Sprintf("nic-supportpkg-%s", unixTimeString)
111+
tarballRootDirName := fmt.Sprintf("%s-supportpkg-%s", product, unixTimeString)
112112

113113
err := c.LogFile.Close()
114114
if err != nil {

0 commit comments

Comments
 (0)