When you build a Go executable, which does already exists and is in use on Windows (e.g. running) then the output binary name will be extended by a '~' prefix.
558eeb2d85/src/cmd/go/internal/work/exec.go (L1165-L1170)
pull/2561/head
# Binaries for programs and plugins | # Binaries for programs and plugins | ||||
*.exe | *.exe | ||||
*.exe~ | |||||
*.dll | *.dll | ||||
*.so | *.so | ||||
*.dylib | *.dylib |