-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor: rename doXXX() #1878
Refactor: rename doXXX() #1878
Conversation
Signed-off-by: kevindiu <kevindiujp@gmail.com>
Signed-off-by: kevindiu <kevindiujp@gmail.com>
[CHATOPS:HELP] ChatOps commands.
|
@@ -447,24 +457,9 @@ func CreateTemp(baseDir string) (f *os.File, err error) { | |||
return nil, errors.ErrFailedToCreateFile(err, path, nil) | |||
} | |||
|
|||
// doExists returns file existence with detailed information |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is merged to the ExistsWithDetail()
Codecov ReportBase: 30.43% // Head: 30.41% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #1878 +/- ##
==========================================
- Coverage 30.43% 30.41% -0.03%
==========================================
Files 365 365
Lines 33763 33761 -2
==========================================
- Hits 10277 10268 -9
- Misses 23077 23081 +4
- Partials 409 412 +3
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
I think it is fine to remain some of doXXX() , please let me know if you have any comment on it :) |
internal/file/file.go
Outdated
} | ||
|
||
func doWriteFile(ctx context.Context, target string, r io.Reader, flg int, perm fs.FileMode) (n int64, err error) { | ||
func writeFileSync(ctx context.Context, target string, r io.Reader, flg int, perm fs.FileMode) (n int64, err error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
func writeFileSync(ctx context.Context, target string, r io.Reader, flg int, perm fs.FileMode) (n int64, err error) { | |
func writeFile(ctx context.Context, target string, r io.Reader, flg int, perm fs.FileMode) (n int64, err error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I renamed this function because of it is warned by deepsource which has confusing name
function WriteFile()
exists in this package. (line 260)
If I rename it to writeFile()
the warning will occur again.
What do you think about it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. thank you for your explanation.
I will close this comment, thank you.
Deploying with Cloudflare Pages
|
Signed-off-by: kevindiu <kevindiujp@gmail.com>
Signed-off-by: kevindiu <kevindiujp@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description:
This PR rename doXXX() worked in these 2 PRs.
Here is the summary of this PR:
doOpen()
->openFile()
doExists()
merged toExistsWithDetail()
doWriteFile()
->writeFileSync()
doJoin()
->joinFilePaths()
doConnect()
->connectWithBackoff()
doConnect()
->reconnectUnhealthy()
doGet()
->getHelthyConn()
doGenFloat32Vec()
->genF32Slice()
doGenUint8Vec()
->genUint8Slice()
doMove()
doRoundTrip()
doSearch()
Related Issue:
Versions:
Checklist:
Special notes for your reviewer: