mirror of
https://github.com/rclone/rclone.git
synced 2025-12-11 22:14:05 +01:00
Version v1.66.0
This commit is contained in:
14
bin/use-deadlock-detector
Executable file
14
bin/use-deadlock-detector
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ ! -z $(git status --short --untracked-files=no) ]]; then
|
||||
echo "Detected uncommitted changes - commit before running this"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Installing deadlock detector - use 'git reset --hard HEAD' to undo"
|
||||
|
||||
go get -v github.com/sasha-s/go-deadlock/...
|
||||
find . -type f -name "*.go" -print0 | xargs -0 sed -i~ 's/sync.RWMutex/deadlock.RWMutex/; s/sync.Mutex/deadlock.Mutex/;'
|
||||
goimports -w .
|
||||
|
||||
echo "Done"
|
||||
Reference in New Issue
Block a user