diff --git a/.gitignore b/.gitignore index 2b6ee26..886d829 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ .vscode __debug_bin /uniclip -.idea \ No newline at end of file +.idea +/dist diff --git a/dist/CHANGELOG.md b/dist/CHANGELOG.md deleted file mode 100644 index eee1693..0000000 --- a/dist/CHANGELOG.md +++ /dev/null @@ -1,5 +0,0 @@ -## Changelog - -24be26e Fix bug: false positive "too many arguments" and some other changes -fbe1308 Formatting changes -c36f806 Update executables and README diff --git a/dist/checksums.txt b/dist/checksums.txt deleted file mode 100644 index 54341e0..0000000 --- a/dist/checksums.txt +++ /dev/null @@ -1,11 +0,0 @@ -0abee3df281252057d1d63fee45ae433d0f5b5e9fc4bf9041d4ac3671195f9a9 uniclip_2.0.1_Linux_armv6.tar.gz -19c300c9f9ffab89b02f884137dc057e869157cd53f9a0f720255678dea243d5 uniclip_2.0.1_freebsd_32-bit.tar.gz -1a069c7e838881da831fbf168f96fd008a7139885a9964fd9845277a4d23c057 uniclip_2.0.1_freebsd_arm64.tar.gz -23cd8f995422312ff059feae82dcfa7a25f06e9d84319dd723de1ebb3b659f4c uniclip_2.0.1_Linux_32-bit.tar.gz -2964b7894df2139f8162ed9559e7a68b5d086007ffa21c9c3ef001d27a00cfa0 uniclip_2.0.1_freebsd_armv6.tar.gz -378bb97b9a3f1eb8f3d492170446a1049107940418115abb64c7de1fc77c5e31 uniclip_2.0.1_freebsd_x86_64.tar.gz -3f4ff0510f940f8540d61085edd6e288428f6f12bcb5cf043c0041dd3f8ba790 uniclip_2.0.1_Windows_x86_64.zip -4638290734183a86107f19981395ae0f3d112dc11592cb3439c1ae6467f4eb07 uniclip_2.0.1_Windows_32-bit.zip -8037c53b43eb2fe0cf75a12b80f784b18221c8bcb157d27ee9c0141ba3bd0439 uniclip_2.0.1_Linux_arm64.tar.gz -ece6eb7dcfd2157b13063d413e15bcf12a0b57a1ec5650c84c9d55273f870f59 uniclip_2.0.1_Linux_x86_64.tar.gz -f9e3f0aa46ee4251eb2caabd35ef17be7e308d2447d9a008e48ddbae5f7dac2e uniclip_2.0.1_Darwin_x86_64.tar.gz diff --git a/dist/config.yaml b/dist/config.yaml deleted file mode 100644 index cb0a82a..0000000 --- a/dist/config.yaml +++ /dev/null @@ -1,117 +0,0 @@ -project_name: uniclip -release: - github: - owner: quackduck - name: uniclip - name_template: '{{.Tag}}' -milestones: -- repo: - owner: quackduck - name: uniclip - name_template: '{{ .Tag }}' -brews: -- name: uniclip - tap: - owner: quackduck - name: homebrew-tap - commit_author: - name: goreleaserbot - email: goreleaser@carlosbecker.com - install: bin.install "uniclip" - description: Cross-platform shared clipboard - homepage: https://github.com/quackduck/uniclip - goarm: "6" -scoop: - name: uniclip - commit_author: - name: goreleaserbot - email: goreleaser@carlosbecker.com - commit_msg_template: Scoop update for {{ .ProjectName }} version {{ .Tag }} -builds: -- id: uniclip - goos: - - freebsd - - windows - - darwin - - linux - goarch: - - amd64 - - arm - - arm64 - - "386" - goarm: - - "6" - targets: - - freebsd_amd64 - - freebsd_arm_6 - - freebsd_arm64 - - freebsd_386 - - windows_amd64 - - windows_386 - - darwin_amd64 - - linux_amd64 - - linux_arm_6 - - linux_arm64 - - linux_386 - dir: . - main: . - ldflags: - - -s -w - binary: uniclip - env: - - CGO_ENABLED=0 - lang: go - gobinary: go -archives: -- id: default - builds: - - uniclip - name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm - }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}' - replacements: - "386": 32-bit - amd64: x86_64 - darwin: Darwin - linux: Linux - windows: Windows - format: tar.gz - format_overrides: - - goos: windows - format: zip - files: - - licence* - - LICENCE* - - license* - - LICENSE* - - readme* - - README* - - changelog* - - CHANGELOG* - allow_different_binary_count: false -snapshot: - name_template: '{{ .Tag }}-next' -checksum: - name_template: checksums.txt - algorithm: sha256 -changelog: - filters: - exclude: - - '^docs:' - - '^test:' - sort: asc -dist: dist -env_files: - github_token: ~/.config/goreleaser/github_token - gitlab_token: ~/.config/goreleaser/gitlab_token - gitea_token: ~/.config/goreleaser/gitea_token -before: - hooks: - - go mod download - - go generate ./... -source: - name_template: '{{ .ProjectName }}-{{ .Version }}' - format: tar.gz -github_urls: - download: https://github.com -gitlab_urls: - download: https://gitlab.com diff --git a/dist/uniclip.rb b/dist/uniclip.rb deleted file mode 100644 index f0651bf..0000000 --- a/dist/uniclip.rb +++ /dev/null @@ -1,28 +0,0 @@ -# This file was generated by GoReleaser. DO NOT EDIT. -class Uniclip < Formula - desc "Cross-platform shared clipboard" - homepage "https://github.com/quackduck/uniclip" - version "2.0.1" - bottle :unneeded - - if OS.mac? - url "https://github.com/quackduck/uniclip/releases/download/v2.0.1/uniclip_2.0.1_Darwin_x86_64.tar.gz" - sha256 "f9e3f0aa46ee4251eb2caabd35ef17be7e308d2447d9a008e48ddbae5f7dac2e" - end - if OS.linux? && Hardware::CPU.intel? - url "https://github.com/quackduck/uniclip/releases/download/v2.0.1/uniclip_2.0.1_Linux_x86_64.tar.gz" - sha256 "ece6eb7dcfd2157b13063d413e15bcf12a0b57a1ec5650c84c9d55273f870f59" - end - if OS.linux? && Hardware::CPU.arm? && !Hardware::CPU.is_64_bit? - url "https://github.com/quackduck/uniclip/releases/download/v2.0.1/uniclip_2.0.1_Linux_armv6.tar.gz" - sha256 "0abee3df281252057d1d63fee45ae433d0f5b5e9fc4bf9041d4ac3671195f9a9" - end - if OS.linux? && Hardware::CPU.arm? && Hardware::CPU.is_64_bit? - url "https://github.com/quackduck/uniclip/releases/download/v2.0.1/uniclip_2.0.1_Linux_arm64.tar.gz" - sha256 "8037c53b43eb2fe0cf75a12b80f784b18221c8bcb157d27ee9c0141ba3bd0439" - end - - def install - bin.install "uniclip" - end -end diff --git a/dist/uniclip_2.0.1_Darwin_x86_64.tar.gz b/dist/uniclip_2.0.1_Darwin_x86_64.tar.gz deleted file mode 100644 index d4b3d27..0000000 Binary files a/dist/uniclip_2.0.1_Darwin_x86_64.tar.gz and /dev/null differ diff --git a/dist/uniclip_2.0.1_Linux_32-bit.tar.gz b/dist/uniclip_2.0.1_Linux_32-bit.tar.gz deleted file mode 100644 index bf66507..0000000 Binary files a/dist/uniclip_2.0.1_Linux_32-bit.tar.gz and /dev/null differ diff --git a/dist/uniclip_2.0.1_Linux_arm64.tar.gz b/dist/uniclip_2.0.1_Linux_arm64.tar.gz deleted file mode 100644 index 6d0ea63..0000000 Binary files a/dist/uniclip_2.0.1_Linux_arm64.tar.gz and /dev/null differ diff --git a/dist/uniclip_2.0.1_Linux_armv6.tar.gz b/dist/uniclip_2.0.1_Linux_armv6.tar.gz deleted file mode 100644 index 5410f14..0000000 Binary files a/dist/uniclip_2.0.1_Linux_armv6.tar.gz and /dev/null differ diff --git a/dist/uniclip_2.0.1_Linux_x86_64.tar.gz b/dist/uniclip_2.0.1_Linux_x86_64.tar.gz deleted file mode 100644 index c3ca4ca..0000000 Binary files a/dist/uniclip_2.0.1_Linux_x86_64.tar.gz and /dev/null differ diff --git a/dist/uniclip_2.0.1_Windows_32-bit.zip b/dist/uniclip_2.0.1_Windows_32-bit.zip deleted file mode 100644 index 9aa8b55..0000000 Binary files a/dist/uniclip_2.0.1_Windows_32-bit.zip and /dev/null differ diff --git a/dist/uniclip_2.0.1_Windows_x86_64.zip b/dist/uniclip_2.0.1_Windows_x86_64.zip deleted file mode 100644 index 60a2068..0000000 Binary files a/dist/uniclip_2.0.1_Windows_x86_64.zip and /dev/null differ diff --git a/dist/uniclip_2.0.1_freebsd_32-bit.tar.gz b/dist/uniclip_2.0.1_freebsd_32-bit.tar.gz deleted file mode 100644 index 21e3067..0000000 Binary files a/dist/uniclip_2.0.1_freebsd_32-bit.tar.gz and /dev/null differ diff --git a/dist/uniclip_2.0.1_freebsd_arm64.tar.gz b/dist/uniclip_2.0.1_freebsd_arm64.tar.gz deleted file mode 100644 index 4912db1..0000000 Binary files a/dist/uniclip_2.0.1_freebsd_arm64.tar.gz and /dev/null differ diff --git a/dist/uniclip_2.0.1_freebsd_armv6.tar.gz b/dist/uniclip_2.0.1_freebsd_armv6.tar.gz deleted file mode 100644 index 0a1ea97..0000000 Binary files a/dist/uniclip_2.0.1_freebsd_armv6.tar.gz and /dev/null differ diff --git a/dist/uniclip_2.0.1_freebsd_x86_64.tar.gz b/dist/uniclip_2.0.1_freebsd_x86_64.tar.gz deleted file mode 100644 index 6287192..0000000 Binary files a/dist/uniclip_2.0.1_freebsd_x86_64.tar.gz and /dev/null differ diff --git a/dist/uniclip_darwin_amd64/uniclip b/dist/uniclip_darwin_amd64/uniclip deleted file mode 100755 index 352c016..0000000 Binary files a/dist/uniclip_darwin_amd64/uniclip and /dev/null differ diff --git a/dist/uniclip_freebsd_386/uniclip b/dist/uniclip_freebsd_386/uniclip deleted file mode 100755 index c0b6d30..0000000 Binary files a/dist/uniclip_freebsd_386/uniclip and /dev/null differ diff --git a/dist/uniclip_freebsd_amd64/uniclip b/dist/uniclip_freebsd_amd64/uniclip deleted file mode 100755 index 1d827b8..0000000 Binary files a/dist/uniclip_freebsd_amd64/uniclip and /dev/null differ diff --git a/dist/uniclip_freebsd_arm64/uniclip b/dist/uniclip_freebsd_arm64/uniclip deleted file mode 100755 index f1f83be..0000000 Binary files a/dist/uniclip_freebsd_arm64/uniclip and /dev/null differ diff --git a/dist/uniclip_freebsd_arm_6/uniclip b/dist/uniclip_freebsd_arm_6/uniclip deleted file mode 100755 index c46c055..0000000 Binary files a/dist/uniclip_freebsd_arm_6/uniclip and /dev/null differ diff --git a/dist/uniclip_linux_386/uniclip b/dist/uniclip_linux_386/uniclip deleted file mode 100755 index eeb92c6..0000000 Binary files a/dist/uniclip_linux_386/uniclip and /dev/null differ diff --git a/dist/uniclip_linux_amd64/uniclip b/dist/uniclip_linux_amd64/uniclip deleted file mode 100755 index 70d1497..0000000 Binary files a/dist/uniclip_linux_amd64/uniclip and /dev/null differ diff --git a/dist/uniclip_linux_arm64/uniclip b/dist/uniclip_linux_arm64/uniclip deleted file mode 100755 index 1251a36..0000000 Binary files a/dist/uniclip_linux_arm64/uniclip and /dev/null differ diff --git a/dist/uniclip_linux_arm_6/uniclip b/dist/uniclip_linux_arm_6/uniclip deleted file mode 100755 index d9ff9ed..0000000 Binary files a/dist/uniclip_linux_arm_6/uniclip and /dev/null differ diff --git a/dist/uniclip_windows_386/uniclip.exe b/dist/uniclip_windows_386/uniclip.exe deleted file mode 100755 index 6777ba8..0000000 Binary files a/dist/uniclip_windows_386/uniclip.exe and /dev/null differ diff --git a/dist/uniclip_windows_amd64/uniclip.exe b/dist/uniclip_windows_amd64/uniclip.exe deleted file mode 100755 index 41fbb3a..0000000 Binary files a/dist/uniclip_windows_amd64/uniclip.exe and /dev/null differ diff --git a/uniclip.go b/uniclip.go index 2056e3f..f530b71 100644 --- a/uniclip.go +++ b/uniclip.go @@ -94,6 +94,11 @@ func handleClient(c net.Conn) { func connectToServer(address string) { c, err := net.Dial("tcp4", address) + if c == nil { + handleError(err) + fmt.Println("Could not connect to", address) + return + } if err != nil { handleError(err) return