Skip to content

docs: troubleshooting cluster#16

Open
CliffordCheefoon wants to merge 3 commits intoautomotiveMastermind:clusterfrom
CliffordCheefoon:cluster
Open

docs: troubleshooting cluster#16
CliffordCheefoon wants to merge 3 commits intoautomotiveMastermind:clusterfrom
CliffordCheefoon:cluster

Conversation

@CliffordCheefoon
Copy link
Copy Markdown

No description provided.

@sjk07
Copy link
Copy Markdown
Contributor

sjk07 commented Sep 7, 2021

LGTM!~

@sjk07 sjk07 self-assigned this Sep 7, 2021
@CliffordCheefoon
Copy link
Copy Markdown
Author

commit 5afbe46 validated for windows

@sjk07
Copy link
Copy Markdown
Contributor

sjk07 commented Jan 26, 2022

@CliffordCheefoon Approved. just a few little things to tidy up =]

if errRmGit != nil {
log.Fatalf("Error removing git folder at /tmp/"+folderName+". %s", errRmGit)
}
// commandRmGit := exec.Command("rm", "-rf", ".git")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove commented code

Comment thread cmd/cluster.go
secret, err := cmd.Output()
check(err)

os.MkdirAll(secretsDir, 0755) //if .secrets folder is missing, create
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keep comments above the code they relate to, not inline.

also since there is no if statement here. perhaps to show the true intention of the code its better to say ensure secrets folder is present. or something along those lines.

// log.Fatalf("Error removing git folder at /tmp/"+folderName+". %s", errRmGit)
// }

removeGitError := os.RemoveAll(clusterRootPath + FPS + "tmp" + FPS + folderName + FPS + ".git")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a native way in go to deal with os specific file path creation. filepath.Join()

I have refactored all of the FPS variable usage out of the code in a PR I wrote a while ago but wasn't merged yet. still a little WIP. #18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants