Open
Conversation
added 2 commits
October 10, 2021 15:05
hjwk
reviewed
Oct 11, 2021
| github.com/rs/cors v1.7.0 | ||
| github.com/shirou/gopsutil v3.21.4+incompatible | ||
| github.com/spf13/cobra v1.1.3 | ||
| github.com/stretchr/testify v1.3.0 |
Contributor
There was a problem hiding this comment.
1.3.0 is kinda old, the latest version is 1.7.0
hjwk
suggested changes
Oct 12, 2021
| } | ||
|
|
||
| func removeFile(baseFileName string) { | ||
| err := os.RemoveAll(baseFileName) |
Contributor
There was a problem hiding this comment.
Your indentation is inconsistent, you might want to run gofmt
| @@ -0,0 +1,164 @@ | |||
| package site | |||
|
|
|||
| import ( | |||
Contributor
There was a problem hiding this comment.
would be nice to run goimports and let it order the imports by
- Standard packages
- External packages
- Private packages
| assert.Equal(t, tt.want, output) | ||
|
|
||
| removeFile(baseFileName) | ||
|
|
| } | ||
|
|
||
| func TestSetSite(t *testing.T) { | ||
|
|
| fileName := filepath.Join(baseFileName, tt.args["pathToSiteInfo"].(string)) | ||
|
|
||
| dest, err := os.Create(fileName) | ||
|
|
Contributor
There was a problem hiding this comment.
it would be better style to stick the line where err is instantiated with the line where the error is checked
Collaborator
|
Hi @Sampriti-Mitra |
mohammed786
approved these changes
Oct 29, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist
Please note that in case of below checklist not updated accordingly, the maintainers have the right to immediately close your pull request.
developbranch.developbranch and not onmain.Description of the Change
Alternate Designs
Risk Impact
Verification Process
Release Notes