Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package tcping for openSUSE:Factory checked in at 2026-05-12 19:30:28 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/tcping (Old) and /work/SRC/openSUSE:Factory/.tcping.new.1966 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "tcping" Tue May 12 19:30:28 2026 rev:9 rq:1352752 version:2.8.0 Changes: -------- --- /work/SRC/openSUSE:Factory/tcping/tcping.changes 2025-01-27 20:57:34.308365333 +0100 +++ /work/SRC/openSUSE:Factory/.tcping.new.1966/tcping.changes 2026-05-12 19:32:35.401809100 +0200 @@ -1,0 +2,12 @@ +Mon May 11 14:40:48 UTC 2026 - Martin Hauke <[email protected]> + +- Update to version 2.8.0 + * feat: add a non-interactive mode through --non-interactive flag + so that tcping can run in the background using nohup or disown. + * feat: add support for host:port format in command arguments. + * fix: omit printing the IP address twice when the given target + is an IP address itself. + * fix: add missing comma separator in no-color statistics output + * fix: version typo resulting in erroneous update message. + +------------------------------------------------------------------- Old: ---- tcping-2.7.1.tar.gz New: ---- tcping-2.8.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ tcping.spec ++++++ --- /var/tmp/diff_new_pack.GcUYaM/_old 2026-05-12 19:32:36.833868394 +0200 +++ /var/tmp/diff_new_pack.GcUYaM/_new 2026-05-12 19:32:36.833868394 +0200 @@ -1,8 +1,8 @@ # # spec file for package tcping # -# Copyright (c) 2025 SUSE LLC -# Copyright (c) 2022-2025, Martin Hauke <[email protected]> +# Copyright (c) 2026 SUSE LLC and contributors +# Copyright (c) 2022-2026, Martin Hauke <[email protected]> # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,7 +18,7 @@ Name: tcping -Version: 2.7.1 +Version: 2.8.0 Release: 0 Summary: A ping program for TCP ports License: MIT ++++++ tcping-2.7.1.tar.gz -> tcping-2.8.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tcping-2.7.1/.github/workflows/codeql-analysis.yml new/tcping-2.8.0/.github/workflows/codeql-analysis.yml --- old/tcping-2.7.1/.github/workflows/codeql-analysis.yml 2025-01-24 21:30:16.000000000 +0100 +++ new/tcping-2.8.0/.github/workflows/codeql-analysis.yml 2026-05-11 13:49:51.000000000 +0200 @@ -38,17 +38,17 @@ steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Setting Go version - uses: actions/[email protected] + uses: actions/[email protected] with: go-version-file: "go.mod" check-latest: true # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v3 + uses: github/codeql-action/init@v4 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. @@ -61,7 +61,7 @@ # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@v3 + uses: github/codeql-action/autobuild@v4 # ℹ️ Command-line programs to run using the OS shell. # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun @@ -77,4 +77,4 @@ run: make check - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 + uses: github/codeql-action/analyze@v4 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tcping-2.7.1/.github/workflows/container-publish.yml new/tcping-2.8.0/.github/workflows/container-publish.yml --- old/tcping-2.7.1/.github/workflows/container-publish.yml 2025-01-24 21:30:16.000000000 +0100 +++ new/tcping-2.8.0/.github/workflows/container-publish.yml 2026-05-11 13:49:51.000000000 +0200 @@ -47,29 +47,29 @@ echo ${{ env.latest_tag }} - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 # Install the cosign tool except on PR # https://github.com/sigstore/cosign-installer - name: Install cosign if: github.event_name != 'pull_request' - uses: sigstore/[email protected] + uses: sigstore/[email protected] with: cosign-release: "v2.1.1" # Workaround: https://github.com/docker/build-push-action/issues/461 - name: Setup Docker buildx - uses: docker/[email protected] + uses: docker/[email protected] - name: Setting Go version - uses: actions/[email protected] + uses: actions/[email protected] with: go-version-file: "go.mod" check-latest: true # cache: true - name: Log in to Docker Hub - uses: docker/[email protected] + uses: docker/[email protected] with: username: ${{ secrets.DOCKER_HUB_USER }} password: ${{ secrets.DOCKER_HUB_PASS }} @@ -78,7 +78,7 @@ # https://github.com/docker/login-action - name: Log into registry ${{ env.REGISTRY }} if: github.event_name != 'pull_request' - uses: docker/[email protected] + uses: docker/[email protected] with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} @@ -88,7 +88,7 @@ # https://github.com/docker/metadata-action - name: Extract Docker metadata id: meta - uses: docker/[email protected] + uses: docker/[email protected] with: images: | pouriyajamshidi/tcping @@ -106,7 +106,7 @@ # https://github.com/docker/build-push-action - name: Build and push Docker image id: build-and-push - uses: docker/build-push-action@67a2d409c0a876cbe6b11854e3e25193efe4e62d + uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f with: context: . push: ${{ github.event_name != 'pull_request' }} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tcping-2.7.1/.github/workflows/lint.yml new/tcping-2.8.0/.github/workflows/lint.yml --- old/tcping-2.7.1/.github/workflows/lint.yml 2025-01-24 21:30:16.000000000 +0100 +++ new/tcping-2.8.0/.github/workflows/lint.yml 2026-05-11 13:49:51.000000000 +0200 @@ -10,9 +10,9 @@ runs-on: ubuntu-latest steps: - name: Check out code into the Go module directory - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Run Revive Action - uses: morphy2k/[email protected] + uses: morphy2k/[email protected] with: config: revive.toml diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tcping-2.7.1/.github/workflows/stale.yml new/tcping-2.8.0/.github/workflows/stale.yml --- old/tcping-2.7.1/.github/workflows/stale.yml 2025-01-24 21:30:16.000000000 +0100 +++ new/tcping-2.8.0/.github/workflows/stale.yml 2026-05-11 13:49:51.000000000 +0200 @@ -10,7 +10,7 @@ issues: read pull-requests: write steps: - - uses: actions/[email protected] + - uses: actions/[email protected] with: repo-token: ${{ secrets.GITHUB_TOKEN }} exempt-assignees: "pouriyajamshidi" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tcping-2.7.1/CHANGELOG.md new/tcping-2.8.0/CHANGELOG.md --- old/tcping-2.7.1/CHANGELOG.md 2025-01-24 21:30:16.000000000 +0100 +++ new/tcping-2.8.0/CHANGELOG.md 2026-05-11 13:49:51.000000000 +0200 @@ -1,10 +1,9 @@ # Changelog -## v2.x.x - Unreleased +## v2.7.1 - 2025-01-26 - release: add tcping to [WinGet](https://learn.microsoft.com/en-us/windows/package-manager/winget) [#113](https://github.com/pouriyajamshidi/tcping/issues/113) - bug: fix name resolution in static builds with `-4` flag causing name resolution failures due to _IPv4-mapped IPv6 addresses_ -- refactor: rename plane to plain printer - CI: apply **Revive** suggestions - CI: add **Revive** to CI - CI: add **Revive** config diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tcping-2.7.1/Dockerfile new/tcping-2.8.0/Dockerfile --- old/tcping-2.7.1/Dockerfile 2025-01-24 21:30:16.000000000 +0100 +++ new/tcping-2.8.0/Dockerfile 2026-05-11 13:49:51.000000000 +0200 @@ -1,6 +1,6 @@ # Build stage ################################################## -FROM docker.io/golang:1.23-alpine3.20 AS build +FROM docker.io/golang:1.24.10-alpine3.22 AS build WORKDIR /build diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tcping-2.7.1/Makefile new/tcping-2.8.0/Makefile --- old/tcping-2.7.1/Makefile 2025-01-24 21:30:16.000000000 +0100 +++ new/tcping-2.8.0/Makefile 2026-05-11 13:49:51.000000000 +0200 @@ -4,7 +4,7 @@ # Meta SHELL := /bin/bash -VERSION := 2.7.0 +VERSION := 2.7.1 MAINTAINER := https://github.com/pouriyajamshidi DESCRIPTION := Ping TCP ports using tcping. Inspired by Linux's ping utility. Written in Go diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tcping-2.7.1/README.cn.md new/tcping-2.8.0/README.cn.md --- old/tcping-2.7.1/README.cn.md 2025-01-24 21:30:16.000000000 +0100 +++ new/tcping-2.8.0/README.cn.md 2026-05-11 13:49:51.000000000 +0200 @@ -109,7 +109,7 @@ - 使用 `go install` 安装: - Go 版本最低要求为 `1.23.1` + Go 版本最低要求为 `1.24.10` ```bash go install github.com/pouriyajamshidi/tcping/v2@latest @@ -179,7 +179,7 @@ 在 **Debian** 及其衍生版本(如 **Ubuntu**)上,下载 `.deb` 软件包: ```bash -wget https://github.com/pouriyajamshidi/tcping/releases/latest/download/tcping_amd64.deb -O /tmp/tcping.deb +wget https://github.com/pouriyajamshidi/tcping/releases/latest/download/tcping-amd64.deb -O /tmp/tcping.deb ``` 并安装它: @@ -230,6 +230,16 @@ tcping 10.10.10.1 22 ``` +您还可以使用 `主机:端口` 格式: + +```bash +tcping www.example.com:443 +# 或使用 IP 地址 +tcping 192.168.1.1:80 +# IPv6 地址(使用引号防止 shell 解析) +tcping '[2001:db8::1]:443' +``` + ### Windows 我们建议使用 [Windows 终端](https://apps.microsoft.com/store/detail/windows-terminal/9N0DX20HK701) 以获得最佳体验和正确的颜色显示。 @@ -238,6 +248,8 @@ ```powershell tcping www.example.com 443 +# 或使用 主机:端口 格式 +tcping www.example.com:443 # 或提供 -r 标志以 # 在一定次数的失败后启用名称解析重试: tcping www.example.com 443 -r 10 @@ -252,9 +264,13 @@ ```bash # 使用 Docker Hub docker run -it pouriyajamshidi/tcping:latest example.com 443 +# 或使用 主机:端口 格式 +docker run -it pouriyajamshidi/tcping:latest example.com:443 # 使用 GitHub 容器注册表: docker run -it ghcr.io/pouriyajamshidi/tcping:latest example.com 443 +# 或使用 主机:端口 格式 +docker run -it ghcr.io/pouriyajamshidi/tcping:latest example.com:443 ``` --- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tcping-2.7.1/README.md new/tcping-2.8.0/README.md --- old/tcping-2.7.1/README.md 2025-01-24 21:30:16.000000000 +0100 +++ new/tcping-2.8.0/README.md 2026-05-11 13:49:51.000000000 +0200 @@ -152,7 +152,7 @@ - Using `go install`: - > This requires at least go version `1.23.1` + > This requires at least go version `1.24.10` ```bash go install github.com/pouriyajamshidi/tcping/v2@latest @@ -193,13 +193,23 @@ tcping www.example.com 443 ``` -2. Specify the interval between probes (2 seconds), the timeout (5 seconds) and source interface: +2. You can also use the `host:port` format for convenience (this will be available in version 3): + +```bash +tcping www.example.com:443 +# Or with an IP address +tcping 192.168.1.1:80 +# IPv6 addresses (use quotes to prevent shell interpretation) +tcping '[2001:db8::1]:443' +``` + +3. Specify the interval between probes (2 seconds), the timeout (5 seconds) and source interface: ```bash tcping www.example.com 443 -i 2 -t 5 -I eth2 ``` -3. Enforce using IPv4 or IPv6 only: +4. Enforce using IPv4 or IPv6 only: ```bash tcping www.example.com 443 -4 @@ -207,26 +217,26 @@ tcping www.example.com 443 -6 ``` -4. Show timestamp of probes: +5. Show timestamp of probes: ```bash tcping www.example.com 443 -D ``` -5. Retry resolving the hostname after 5 failures: +6. Retry resolving the hostname after 5 failures: ```bash tcping www.example.com 443 -r 5 ``` -6. Stop after 5 probes: +7. Stop after 5 probes: ```bash tcping www.example.com 443 -c 5 ``` -7. Change the default output from colored to: +8. Change the default output from colored to: ```bash # Save the output in CSV format: @@ -249,9 +259,13 @@ ```bash # If downloaded from Docker Hub docker run -it pouriyajamshidi/tcping:latest example.com 443 +# Or using host:port format +docker run -it pouriyajamshidi/tcping:latest example.com:443 # If downloaded from GitHub container registry: docker run -it ghcr.io/pouriyajamshidi/tcping:latest example.com 443 +# Or using host:port format +docker run -it ghcr.io/pouriyajamshidi/tcping:latest example.com:443 ``` > [!TIP] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tcping-2.7.1/go.mod new/tcping-2.8.0/go.mod --- old/tcping-2.7.1/go.mod 2025-01-24 21:30:16.000000000 +0100 +++ new/tcping-2.8.0/go.mod 2026-05-11 13:49:51.000000000 +0200 @@ -1,12 +1,12 @@ module github.com/pouriyajamshidi/tcping/v2 -go 1.23.1 +go 1.24.0 require ( github.com/google/go-github/v45 v45.2.0 - github.com/gookit/color v1.5.4 - github.com/stretchr/testify v1.10.0 - zombiezen.com/go/sqlite v1.4.0 + github.com/gookit/color v1.6.1 + github.com/stretchr/testify v1.11.1 + zombiezen.com/go/sqlite v1.4.2 ) require ( @@ -19,12 +19,12 @@ github.com/pmezard/go-difflib v1.0.0 // indirect github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect - golang.org/x/crypto v0.32.0 // indirect - golang.org/x/exp v0.0.0-20250106191152-7588d65b2ba8 // indirect - golang.org/x/sys v0.29.0 // indirect + golang.org/x/crypto v0.45.0 // indirect + golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0 // indirect + golang.org/x/sys v0.38.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - modernc.org/libc v1.61.8 // indirect + modernc.org/libc v1.65.7 // indirect modernc.org/mathutil v1.7.1 // indirect - modernc.org/memory v1.8.2 // indirect - modernc.org/sqlite v1.34.5 // indirect + modernc.org/memory v1.11.0 // indirect + modernc.org/sqlite v1.37.1 // indirect ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tcping-2.7.1/go.sum new/tcping-2.8.0/go.sum --- old/tcping-2.7.1/go.sum 2025-01-24 21:30:16.000000000 +0100 +++ new/tcping-2.8.0/go.sum 2026-05-11 13:49:51.000000000 +0200 @@ -11,8 +11,10 @@ github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/gookit/color v1.5.4 h1:FZmqs7XOyGgCAxmWyPslpiok1k05wmY3SJTytgvYFs0= -github.com/gookit/color v1.5.4/go.mod h1:pZJOeOS8DM43rXbp4AZo1n9zCU2qjpcRko0b6/QJi9w= +github.com/gookit/assert v0.1.1 h1:lh3GcawXe/p+cU7ESTZ5Ui3Sm/x8JWpIis4/1aF0mY0= +github.com/gookit/assert v0.1.1/go.mod h1:jS5bmIVQZTIwk42uXl4lyj4iaaxx32tqH16CFj0VX2E= +github.com/gookit/color v1.6.1 h1:KoTnDxJPRgrL0SoX0f8rCFg2zI0t4E3GZZBMo2nN8LU= +github.com/gookit/color v1.6.1/go.mod h1:9ACFc7/1IpHGBW8RwuDm/0YEnhg3dwwXpoMsmtyHfjs= github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/ncruces/go-strftime v0.1.9 h1:bY0MQC28UADQmHmaF5dgpLmImcShSi2kHU9XLdhx/f4= @@ -21,53 +23,53 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= -github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= -github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e h1:JVG44RsyaB9T2KIHavMF/ppJZNG9ZpyihvCd0w101no= github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e/go.mod h1:RbqR21r5mrJuqunuUZ/Dhy/avygyECGrLceyNeo4LiM= -golang.org/x/crypto v0.32.0 h1:euUpcYgM8WcP71gNpTqQCn6rC2t6ULUPiOzfWaXVVfc= -golang.org/x/crypto v0.32.0/go.mod h1:ZnnJkOaASj8g0AjIduWNlq2NRxL0PlBrbKVyZ6V/Ugc= -golang.org/x/exp v0.0.0-20250106191152-7588d65b2ba8 h1:yqrTHse8TCMW1M1ZCP+VAR/l0kKxwaAIqN/il7x4voA= -golang.org/x/exp v0.0.0-20250106191152-7588d65b2ba8/go.mod h1:tujkw807nyEEAamNbDrEGzRav+ilXA7PCRAd6xsmwiU= -golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4= -golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= -golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ= -golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/crypto v0.45.0 h1:jMBrvKuj23MTlT0bQEOBcAE0mjg8mK9RXFhRH6nyF3Q= +golang.org/x/crypto v0.45.0/go.mod h1:XTGrrkGJve7CYK7J8PEww4aY7gM3qMCElcJQ8n8JdX4= +golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0 h1:R84qjqJb5nVJMxqWYb3np9L5ZsaDtB+a39EqjV0JSUM= +golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0/go.mod h1:S9Xr4PYopiDyqSyp5NjCrhFrqg6A5zA2E/iPHPhqnS8= +golang.org/x/mod v0.24.0 h1:ZfthKaKaT4NrhGVZHO1/WDTwGES4De8KtWO0SIbNJMU= +golang.org/x/mod v0.24.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww= +golang.org/x/sync v0.14.0 h1:woo0S4Yywslg6hp4eUFjTVOyKt0RookbpAHG4c1HmhQ= +golang.org/x/sync v0.14.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.29.0 h1:TPYlXGxvx1MGTn2GiZDhnjPA9wZzZeGKHHmKhHYvgaU= -golang.org/x/sys v0.29.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo= -golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= -golang.org/x/tools v0.29.0 h1:Xx0h3TtM9rzQpQuR4dKLrdglAmCEN5Oi+P74JdhdzXE= -golang.org/x/tools v0.29.0/go.mod h1:KMQVMRsVxU6nHCFXrBPhDB8XncLNLM0lIy/F14RP588= +golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc= +golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/text v0.31.0 h1:aC8ghyu4JhP8VojJ2lEHBnochRno1sgL6nEi9WGFGMM= +golang.org/x/text v0.31.0/go.mod h1:tKRAlv61yKIjGGHX/4tP1LTbc13YSec1pxVEWXzfoeM= +golang.org/x/tools v0.33.0 h1:4qz2S3zmRxbGIhDIAgjxvFutSvH5EfnsYrRBj0UI0bc= +golang.org/x/tools v0.33.0/go.mod h1:CIJMaWEY88juyUfo7UbgPqbC8rU2OqfAV1h2Qp0oMYI= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -modernc.org/cc/v4 v4.24.4 h1:TFkx1s6dCkQpd6dKurBNmpo+G8Zl4Sq/ztJ+2+DEsh0= -modernc.org/cc/v4 v4.24.4/go.mod h1:uVtb5OGqUKpoLWhqwNQo/8LwvoiEBLvZXIQ/SmO6mL0= -modernc.org/ccgo/v4 v4.23.12 h1:UF08a38c4B+K3VoGipBrVWLFUCHd8+X20QZtFAIlQNk= -modernc.org/ccgo/v4 v4.23.12/go.mod h1:vdN4h2WR5aEoNondUx26K7G8X+nuBscYnAEWSRmN2/0= -modernc.org/fileutil v1.3.0 h1:gQ5SIzK3H9kdfai/5x41oQiKValumqNTDXMvKo62HvE= -modernc.org/fileutil v1.3.0/go.mod h1:XatxS8fZi3pS8/hKG2GH/ArUogfxjpEKs3Ku3aK4JyQ= -modernc.org/gc/v2 v2.6.1 h1:+Qf6xdG8l7B27TQ8D8lw/iFMUj1RXRBOuMUWziJOsk8= -modernc.org/gc/v2 v2.6.1/go.mod h1:YgIahr1ypgfe7chRuJi2gD7DBQiKSLMPgBQe9oIiito= -modernc.org/libc v1.61.8 h1:50KrjlFFoKq9ABh+bNVUf5SfVfQ4NY7CEyFBh65qc60= -modernc.org/libc v1.61.8/go.mod h1:XloulGc0yIRM+91kbwrp7jNi/mfYPAvDOD2qwzWEij0= +modernc.org/cc/v4 v4.26.1 h1:+X5NtzVBn0KgsBCBe+xkDC7twLb/jNVj9FPgiwSQO3s= +modernc.org/cc/v4 v4.26.1/go.mod h1:uVtb5OGqUKpoLWhqwNQo/8LwvoiEBLvZXIQ/SmO6mL0= +modernc.org/ccgo/v4 v4.28.0 h1:rjznn6WWehKq7dG4JtLRKxb52Ecv8OUGah8+Z/SfpNU= +modernc.org/ccgo/v4 v4.28.0/go.mod h1:JygV3+9AV6SmPhDasu4JgquwU81XAKLd3OKTUDNOiKE= +modernc.org/fileutil v1.3.1 h1:8vq5fe7jdtEvoCf3Zf9Nm0Q05sH6kGx0Op2CPx1wTC8= +modernc.org/fileutil v1.3.1/go.mod h1:HxmghZSZVAz/LXcMNwZPA/DRrQZEVP9VX0V4LQGQFOc= +modernc.org/gc/v2 v2.6.5 h1:nyqdV8q46KvTpZlsw66kWqwXRHdjIlJOhG6kxiV/9xI= +modernc.org/gc/v2 v2.6.5/go.mod h1:YgIahr1ypgfe7chRuJi2gD7DBQiKSLMPgBQe9oIiito= +modernc.org/libc v1.65.7 h1:Ia9Z4yzZtWNtUIuiPuQ7Qf7kxYrxP1/jeHZzG8bFu00= +modernc.org/libc v1.65.7/go.mod h1:011EQibzzio/VX3ygj1qGFt5kMjP0lHb0qCW5/D/pQU= modernc.org/mathutil v1.7.1 h1:GCZVGXdaN8gTqB1Mf/usp1Y/hSqgI2vAGGP4jZMCxOU= modernc.org/mathutil v1.7.1/go.mod h1:4p5IwJITfppl0G4sUEDtCr4DthTaT47/N3aT6MhfgJg= -modernc.org/memory v1.8.2 h1:cL9L4bcoAObu4NkxOlKWBWtNHIsnnACGF/TbqQ6sbcI= -modernc.org/memory v1.8.2/go.mod h1:ZbjSvMO5NQ1A2i3bWeDiVMxIorXwdClKE/0SZ+BMotU= +modernc.org/memory v1.11.0 h1:o4QC8aMQzmcwCK3t3Ux/ZHmwFPzE6hf2Y5LbkRs+hbI= +modernc.org/memory v1.11.0/go.mod h1:/JP4VbVC+K5sU2wZi9bHoq2MAkCnrt2r98UGeSK7Mjw= modernc.org/opt v0.1.4 h1:2kNGMRiUjrp4LcaPuLY2PzUfqM/w9N23quVwhKt5Qm8= modernc.org/opt v0.1.4/go.mod h1:03fq9lsNfvkYSfxrfUhZCWPk1lm4cq4N+Bh//bEtgns= modernc.org/sortutil v1.2.1 h1:+xyoGf15mM3NMlPDnFqrteY07klSFxLElE2PVuWIJ7w= modernc.org/sortutil v1.2.1/go.mod h1:7ZI3a3REbai7gzCLcotuw9AC4VZVpYMjDzETGsSMqJE= -modernc.org/sqlite v1.34.5 h1:Bb6SR13/fjp15jt70CL4f18JIN7p7dnMExd+UFnF15g= -modernc.org/sqlite v1.34.5/go.mod h1:YLuNmX9NKs8wRNK2ko1LW1NGYcc9FkBO69JOt1AR9JE= +modernc.org/sqlite v1.37.1 h1:EgHJK/FPoqC+q2YBXg7fUmES37pCHFc97sI7zSayBEs= +modernc.org/sqlite v1.37.1/go.mod h1:XwdRtsE1MpiBcL54+MbKcaDvcuej+IYSMfLN6gSKV8g= modernc.org/strutil v1.2.1 h1:UneZBkQA+DX2Rp35KcM69cSsNES9ly8mQWD71HKlOA0= modernc.org/strutil v1.2.1/go.mod h1:EHkiggD70koQxjVdSBM3JKM7k6L0FbGE5eymy9i3B9A= modernc.org/token v1.1.0 h1:Xl7Ap9dKaEs5kLoOQeQmPWevfnk/DM5qcLcYlA8ys6Y= modernc.org/token v1.1.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= -zombiezen.com/go/sqlite v1.4.0 h1:N1s3RIljwtp4541Y8rM880qgGIgq3fTD2yks1xftnKU= -zombiezen.com/go/sqlite v1.4.0/go.mod h1:0w9F1DN9IZj9AcLS9YDKMboubCACkwYCGkzoy3eG5ik= +zombiezen.com/go/sqlite v1.4.2 h1:KZXLrBuJ7tKNEm+VJcApLMeQbhmAUOKA5VWS93DfFRo= +zombiezen.com/go/sqlite v1.4.2/go.mod h1:5Kd4taTAD4MkBzT25mQ9uaAlLjyR0rFhsR6iINO70jc= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tcping-2.7.1/statsprinter.go new/tcping-2.8.0/statsprinter.go --- old/tcping-2.7.1/statsprinter.go 2025-01-24 21:30:16.000000000 +0100 +++ new/tcping-2.8.0/statsprinter.go 2026-05-11 13:49:51.000000000 +0200 @@ -271,7 +271,7 @@ } else { fmt.Printf("\n--- %s TCPing statistics ---\n", t.userInput.hostname) } - fmt.Printf("%d probes transmitted on port %d | %d received", totalPackets, t.userInput.port, t.totalSuccessfulProbes) + fmt.Printf("%d probes transmitted on port %d | %d received, ", totalPackets, t.userInput.port, t.totalSuccessfulProbes) /* packet loss stats */ fmt.Printf("%.2f%% packet loss\n", packetLoss) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tcping-2.7.1/tcping.go new/tcping-2.8.0/tcping.go --- old/tcping-2.7.1/tcping.go 2025-01-24 21:30:16.000000000 +0100 +++ new/tcping-2.8.0/tcping.go 2026-05-11 13:49:51.000000000 +0200 @@ -221,6 +221,8 @@ colorRed("Try running %s like:\n", executableName) colorRed("%s <hostname/ip> <port number>. For example:\n", executableName) colorRed("%s www.example.com 443\n", executableName) + colorRed("Or use the <hostname/ip:port> format:\n") + colorRed("%s www.example.com:443\n", executableName) colorYellow("\n[optional flags]\n") flag.VisitAll(func(f *flag.Flag) { @@ -295,6 +297,32 @@ tcping.userInput.port = uint16(port) } +// parseHostPortArgs handles both "host port" and "host:port" formats +// It returns a slice with exactly 2 elements [host, port] if successful +func parseHostPortArgs(args []string) []string { + if len(args) == 1 { + // Check if the single argument is in "host:port" format + parts := strings.Split(args[0], ":") + if len(parts) == 2 { + // Valid "host:port" format + return parts + } else if len(parts) > 2 { + // Could be IPv6 address with port like [::1]:8080 or ::1:8080 + // Try to find the last colon as port separator + lastColonIndex := strings.LastIndex(args[0], ":") + if lastColonIndex > 0 { + host := args[0][:lastColonIndex] + port := args[0][lastColonIndex+1:] + // Remove brackets if present for IPv6 + host = strings.TrimPrefix(host, "[") + host = strings.TrimSuffix(host, "]") + return []string{host, port} + } + } + } + return args +} + // setGenericArgs assigns the generic flags after sanity checks func setGenericArgs(tcping *tcping, genericArgs genericUserInputArgs) { if *genericArgs.retryResolve > 0 { @@ -384,6 +412,9 @@ } // host and port must be specified + // Support both "host port" and "host:port" formats + args = parseHostPortArgs(args) + if len(args) != 2 { usage() } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tcping-2.7.1/tcping_test.go new/tcping-2.8.0/tcping_test.go --- old/tcping-2.7.1/tcping_test.go 2025-01-24 21:30:16.000000000 +0100 +++ new/tcping-2.8.0/tcping_test.go 2026-05-11 13:49:51.000000000 +0200 @@ -137,6 +137,71 @@ assert.Equal(t, stats.totalDowntime, 16*time.Minute+40*time.Second) } +func TestParseHostPortArgs(t *testing.T) { + tests := []struct { + name string + args []string + want []string + }{ + { + name: "traditional format: host port", + args: []string{"example.com", "8080"}, + want: []string{"example.com", "8080"}, + }, + { + name: "host:port format", + args: []string{"example.com:8080"}, + want: []string{"example.com", "8080"}, + }, + { + name: "IPv4:port format", + args: []string{"192.168.1.1:443"}, + want: []string{"192.168.1.1", "443"}, + }, + { + name: "IPv6 with brackets and port", + args: []string{"[2001:db8::1]:8080"}, + want: []string{"2001:db8::1", "8080"}, + }, + { + name: "IPv6 without brackets and port", + args: []string{"2001:db8::1:8080"}, + want: []string{"2001:db8::1", "8080"}, + }, + { + name: "localhost:port format", + args: []string{"localhost:80"}, + want: []string{"localhost", "80"}, + }, + { + name: "IPv6 localhost with brackets", + args: []string{"[::1]:22"}, + want: []string{"::1", "22"}, + }, + { + name: "IPv6 localhost without brackets", + args: []string{"::1:22"}, + want: []string{"::1", "22"}, + }, + { + name: "single argument without colon", + args: []string{"example.com"}, + want: []string{"example.com"}, + }, + { + name: "three arguments unchanged", + args: []string{"example.com", "8080", "extra"}, + want: []string{"example.com", "8080", "extra"}, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + got := parseHostPortArgs(tt.args) + assert.Equal(t, tt.want, got) + }) + } +} + func TestPermuteArgs(t *testing.T) { type args struct { args []string ++++++ vendor.tar.gz ++++++ /work/SRC/openSUSE:Factory/tcping/vendor.tar.gz /work/SRC/openSUSE:Factory/.tcping.new.1966/vendor.tar.gz differ: char 5, line 1
