mirror of
https://github.com/ddworken/hishtory.git
synced 2024-11-25 09:43:20 +01:00
Improve copy function error checking + delete make fuzz because of https://github.com/golang/go/issues/52569
This commit is contained in:
parent
1df50731be
commit
9895a5c677
3
Makefile
3
Makefile
@ -5,9 +5,6 @@ forcetest:
|
||||
test:
|
||||
HISHTORY_TEST=1 go test -p 1 ./...
|
||||
|
||||
fuzz:
|
||||
HISHTORY_TEST=1 go test -p 1 -fuzz=FuzzTestMultipleUsers -run FuzzTestMultipleUsers client/client_test.go
|
||||
|
||||
acttest:
|
||||
act push -j test -e .github/push_event.json --reuse --container-architecture linux/amd64
|
||||
|
||||
|
@ -634,11 +634,15 @@ func copyFile(src, dst string) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer destination.Close()
|
||||
|
||||
_, err = io.Copy(destination, source)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return destination.Close()
|
||||
}
|
||||
|
||||
func GetDownloadData() (shared.UpdateInfo, error) {
|
||||
respBody, err := ApiGet("/api/v1/download")
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user