From dfc7865bc18f00b165efaeaa441a9ad5de6ceeeb Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Wed, 15 Mar 2023 23:28:01 +0100 Subject: [PATCH 01/22] go.mod: Upgrade packages. --- go.mod | 6 +++--- go.sum | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index 2479bd0..3598691 100644 --- a/go.mod +++ b/go.mod @@ -9,7 +9,7 @@ require ( require ( github.com/google/uuid v1.3.0 // indirect - golang.org/x/net v0.5.0 // indirect - golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f // indirect - golang.org/x/sys v0.4.0 // indirect + golang.org/x/net v0.8.0 // indirect + golang.org/x/sync v0.1.0 // indirect + golang.org/x/sys v0.6.0 // indirect ) diff --git a/go.sum b/go.sum index d532404..8b4cd58 100644 --- a/go.sum +++ b/go.sum @@ -4,9 +4,9 @@ github.com/pborman/getopt/v2 v2.1.0 h1:eNfR+r+dWLdWmV8g5OlpyrTYHkhVNxHBdN2cCrJmO github.com/pborman/getopt/v2 v2.1.0/go.mod h1:4NtW75ny4eBw9fO1bhtNdYTlZKYX5/tBLtsOpwKIKd0= github.com/prometheus-community/pro-bing v0.1.0 h1:zjzLGhfNPP0bP1OlzGB+SJcguOViw7df12LPg2vUJh8= github.com/prometheus-community/pro-bing v0.1.0/go.mod h1:BpWlHurD9flHtzq8wrh8QGWYz9ka9z9ZJAyOel8ej58= -golang.org/x/net v0.5.0 h1:GyT4nK/YDHSqa1c4753ouYCDajOYKTja9Xb/OHtgvSw= -golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= -golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f h1:Ax0t5p6N38Ga0dThY21weqDEyz2oklo4IvDkpigvkD8= -golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sys v0.4.0 h1:Zr2JFtRQNX3BCZ8YtxRE9hNJYC8J6I1MVbMg6owUp18= -golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/net v0.8.0 h1:Zrh2ngAOFYneWTAIAPethzeaQLuHwhuBkuV6ZiRnUaQ= +golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= +golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= From ede12055013c093906785dbe9bcf7f8d79df2c05 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Wed, 15 Mar 2023 23:30:49 +0100 Subject: [PATCH 02/22] main.go: defer cleanup functions in eventLoop() --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index e347c43..270d47e 100644 --- a/main.go +++ b/main.go @@ -24,6 +24,8 @@ func printStats(pinger *probing.Pinger) { func eventLoop(pinger *probing.Pinger) { ticker := time.NewTicker(time.Second * 4) + defer ticker.Stop() + defer pinger.Stop() // Setup signals on term and interrupt. sig := make(chan os.Signal, 1) @@ -33,8 +35,6 @@ func eventLoop(pinger *probing.Pinger) { select { // Got signal. stop pinger and exit goroutine case <-sig: - ticker.Stop() - pinger.Stop() return // Ticker ticks. print stats. case <-ticker.C: From e7c49dac1c2e1cb5304369f1150b0de1e929b3b4 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Sat, 18 May 2024 17:33:55 +0200 Subject: [PATCH 03/22] Print signal when received --- main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 270d47e..29584b4 100644 --- a/main.go +++ b/main.go @@ -34,7 +34,8 @@ func eventLoop(pinger *probing.Pinger) { for { select { // Got signal. stop pinger and exit goroutine - case <-sig: + case s := <-sig: + fmt.Printf("Recived signal: %s, exiting.", s) return // Ticker ticks. print stats. case <-ticker.C: From cef5f5daba5fb671f96e7c8c85aea022da0c5754 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Sun, 25 May 2025 22:25:14 +0200 Subject: [PATCH 04/22] main.go: proper improt alias --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index 29584b4..8a4980b 100644 --- a/main.go +++ b/main.go @@ -8,7 +8,7 @@ import ( "time" "github.com/pborman/getopt/v2" - "github.com/prometheus-community/pro-bing" + probing "github.com/prometheus-community/pro-bing" ) // printStats prints statistics from a ping. From ab292886a85ddc67d06d15c87a5373ac3717c56b Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Sun, 25 May 2025 22:26:12 +0200 Subject: [PATCH 05/22] main.go: add option to changes stats interval. --- main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index 8a4980b..ead1aff 100644 --- a/main.go +++ b/main.go @@ -22,8 +22,7 @@ func printStats(pinger *probing.Pinger) { stats.MinRtt, stats.AvgRtt, stats.MaxRtt, stats.StdDevRtt) } -func eventLoop(pinger *probing.Pinger) { - ticker := time.NewTicker(time.Second * 4) +func eventLoop(pinger *probing.Pinger, ticker *time.Ticker) { defer ticker.Stop() defer pinger.Stop() @@ -52,6 +51,7 @@ func main() { count := getopt.IntLong("count", 'c', 0, "Stop after this many packages has been sent (and received). If this option is not specified, pinger will operate until interrupted.") timeout := getopt.DurationLong("timeout", 't', 0, "Exit the program after this time is reached, regardless of how many packets have been received.") interval := getopt.DurationLong("interval", 'i', time.Second*2, "Wait time between each packet send") + statsInterval := getopt.DurationLong("stats-interval", 0, time.Second*4, "How often stats should be printed to the console.") proto_udp := getopt.BoolLong("udp", 0, "Send UDP ping instead of a raw IMCP ping, IMCP required super-user privileges") record_rtt := getopt.BoolLong("rtt", 0, "Keep a record of rtts of all received packets.") @@ -85,7 +85,7 @@ func main() { } // Enter event loop in another goroutine. - go eventLoop(pinger) + go eventLoop(pinger, time.NewTicker(*statsInterval)) // Run pinger in main thread. fmt.Println("PING", pinger.Addr()) From c010b082da4dd7d50f329223e4ea23b36ee61b66 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Sun, 25 May 2025 22:28:47 +0200 Subject: [PATCH 06/22] Adding makefile --- Makefile | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..c01b168 --- /dev/null +++ b/Makefile @@ -0,0 +1,5 @@ + +GO=go + +pinger : main.go + $(GO) build -o $@ $^ From 74a3e98e5b1b69dad14bfbcd452f7f412c77f9ff Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Sun, 25 May 2025 22:28:55 +0200 Subject: [PATCH 07/22] gitignore: ignore pinger binary --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index adb36c8..f8b2950 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -*.exe \ No newline at end of file +pinger +*.exe From 7dac879682527a2d51df14213a07fd1c2af4671e Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Mon, 26 May 2025 19:42:51 +0200 Subject: [PATCH 08/22] adding .github/workflows/test.yml --- .github/workflows/test.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..055d997 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,27 @@ +name: Test + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: '1.20' + + - name: Fmt + run: go fmt $(go list ./... | grep -v /vendor/) + - name: Vet + run: go vet $(go list ./... | grep -v /vendor/) + - name: Test + run: go test -race $(go list ./... | grep -v /vendor/) + From 771e1b994a7eb7d34520371d7e88ab89fc9f6dbf Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Mon, 26 May 2025 19:45:06 +0200 Subject: [PATCH 09/22] remove .gitlab-ci.yml --- .gitlab-ci.yml | 46 ---------------------------------------------- 1 file changed, 46 deletions(-) delete mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index 69fb79a..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,46 +0,0 @@ -# This file is a template, and might need editing before it works on your project. -# You can copy and paste this template into a new `.gitlab-ci.yml` file. -# You should not add this template to an existing `.gitlab-ci.yml` file by using the `include:` keyword. -# -# To contribute improvements to CI/CD templates, please follow the Development guide at: -# https://docs.gitlab.com/ee/development/cicd/templates.html -# This specific template is located at: -# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Go.gitlab-ci.yml - -stages: - - test - - build - - release - -format: - image: golang:latest - stage: test - script: - - go fmt $(go list ./... | grep -v /vendor/) - - go vet $(go list ./... | grep -v /vendor/) - - go test -race $(go list ./... | grep -v /vendor/) - -compile: - image: golang:latest - stage: build - script: - - mkdir -p bin - - GOOS=windows GOARCH=386 go build -o bin/pinger-32.exe ./... - - GOOS=windows GOARCH=amd64 go build -o bin/pinger-x64.exe ./... - - GOOS=linux GOARCH=386 go build -o bin/pinger-linux-x86 ./... - - GOOS=linux GOARCH=amd64 go build -o bin/pinger-linux-x64 ./... - artifacts: - paths: - - bin - expire_in: 1 week - -upload: - stage: release - image: curlimages/curl:latest - rules: - - if: $CI_COMMIT_TAG - script: - - 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file bin/pinger-32.exe "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/release/${CI_COMMIT_TAG}/pinger-32.exe"' - - 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file bin/pinger-x64.exe "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/release/${CI_COMMIT_TAG}/pinger-x64.exe"' - - 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file bin/pinger-linux-x86 "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/release/${CI_COMMIT_TAG}/pinger-linux-x86"' - - 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file bin/pinger-linux-x64 "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/release/${CI_COMMIT_TAG}/pinger-linux-x64"' \ No newline at end of file From 4869175152e7364e572aa19cc43ee078a200a214 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Mon, 26 May 2025 19:53:33 +0200 Subject: [PATCH 10/22] adding .github/workflows/release.yml --- .github/workflows/release.yml | 38 +++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..5b255d1 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,38 @@ +name: Release +permissions: + contents: write + +on: + release: + types: [ created ] + +jobs: + compile: + strategy: + fail-fast: false + matrix: + os: [ linux, darwin, windows ] + arch: [ amd64, 386 ] + name: Release - ${{matrix.os}}-${{matrix.arch}} + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: 1.20 + + - name: compile + run: | + GOOS=${{matrix.os}} GOARCH=${{matrix.arch}} make + + - name: Upload release assets + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ github.event.release.upload_url }} + asset_name: pinger-${{github.event.release.tag_name}}-${{matrix.os}}-${{matrix.arch}} + asset_path: pinger + asset_content_type: application/octal-stream From ad48db3b0aa490603457f814dcd4e12cce0dd42f Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Thu, 29 May 2025 22:24:29 +0200 Subject: [PATCH 11/22] Version 0.0.3 --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index ead1aff..69c24a2 100644 --- a/main.go +++ b/main.go @@ -59,7 +59,7 @@ func main() { getopt.Parse() if *version { - fmt.Println("Version 0.0.2") + fmt.Println("Version 0.0.3") os.Exit(0) } From aa05c99bea7bedec02b129d82a437af0bacf1d75 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Fri, 30 May 2025 16:39:08 +0200 Subject: [PATCH 12/22] .github/workflows/release.yml: set correct version --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5b255d1..bf9b38a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,7 +21,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: 1.20 + go-version: "1.20" - name: compile run: | From 111ff58fcf5a3a12dfacf00cae521ee6099a54c0 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Fri, 30 May 2025 16:44:19 +0200 Subject: [PATCH 13/22] .github/workflows/release.yml: exclude darwin 386 --- .github/workflows/release.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bf9b38a..a198643 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,6 +13,9 @@ jobs: matrix: os: [ linux, darwin, windows ] arch: [ amd64, 386 ] + exclude: + - os: darwin + arch: 386 name: Release - ${{matrix.os}}-${{matrix.arch}} runs-on: ubuntu-24.04 steps: From 5571ba3f38aecb8292f773f7d519879648acc02b Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Sat, 31 May 2025 17:16:22 +0200 Subject: [PATCH 14/22] go.mod: set minimum version to 1.20 --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 3598691..d240580 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module pinger -go 1.19 +go 1.20 require ( github.com/pborman/getopt/v2 v2.1.0 From 27479462641995309a91739781a92a4b39e02370 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Sat, 31 May 2025 17:16:33 +0200 Subject: [PATCH 15/22] add README and LICENSE --- LICENSE | 21 ++++++++++++++++++++ README.md | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+) create mode 100644 LICENSE create mode 100644 README.md diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..349c2d8 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023-2025 Henrik Hautakoski + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..6a21d42 --- /dev/null +++ b/README.md @@ -0,0 +1,57 @@ +# Pinger + +**Pinger** is a lightweight, high-performance network utility written in Go. +It enables users to send ICMP echo requests (pings) to specified hosts, facilitating network diagnostics and monitoring. + +## Features + +* Send ICMP echo requests to specified hosts. +* Measure round-trip time (RTT) for each ping. +* Support for both IPv4 and IPv6 addresses. +* Configurable number of ping attempts and intervals. +* Lightweight and efficient, suitable for scripting and automation. + +## Installation + +### Prerequisites + +* Go (version 1.20 or later) installed on your system. +* make + +### Steps + +1. Clone the repository: + +```bash +git clone https://github.com/pnx/pinger.git +cd pinger +``` + +2. Build the application: + +```bash +make +``` + +## Usage + +See `./pinger -h` + +### Example + +```bash +./pinger --udp -t 30s example.com +``` + +This command sends UDP echo requests to example.com, stopping after 30 seconds + +```bash +./pinger -c 8 -i 1s example.com +``` + +This command sends 8 ICMP echo requests to example.com, with a 1-second interval between pings. +NOTE: this requires root privileges + +## License + +This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details. From 57a969561e09adee82da4bdf9872c8078b37ca94 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Sat, 31 May 2025 17:24:25 +0200 Subject: [PATCH 16/22] main.go: make printStats() take a probing.Statistics object. --- main.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/main.go b/main.go index 69c24a2..5ae0c37 100644 --- a/main.go +++ b/main.go @@ -12,9 +12,7 @@ import ( ) // printStats prints statistics from a ping. -func printStats(pinger *probing.Pinger) { - stats := pinger.Statistics() - +func printStats(stats *probing.Statistics) { fmt.Printf("%d packets transmitted, %d packets received, %.2f%% packet loss\n", stats.PacketsSent, stats.PacketsRecv, stats.PacketLoss) @@ -38,7 +36,7 @@ func eventLoop(pinger *probing.Pinger, ticker *time.Ticker) { return // Ticker ticks. print stats. case <-ticker.C: - printStats(pinger) + printStats(pinger.Statistics()) } } } From fffed4e4e1255a29aa865334dea95ed838063292 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Sat, 31 May 2025 17:24:50 +0200 Subject: [PATCH 17/22] main.go: set printStatus as OnFinish callback to pinger. --- main.go | 1 + 1 file changed, 1 insertion(+) diff --git a/main.go b/main.go index 5ae0c37..f449cac 100644 --- a/main.go +++ b/main.go @@ -78,6 +78,7 @@ func main() { pinger.Source = *source pinger.Count = *count pinger.RecordRtts = *record_rtt + pinger.OnFinish = printStats if timeout != nil && *timeout > 0 { pinger.Timeout = *timeout } From 7870fc361ae8acd01ac7a35692842cc7684d3f0e Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Sat, 31 May 2025 17:27:17 +0200 Subject: [PATCH 18/22] main.go: cleanup signal output by printing a newline at the end. --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index f449cac..d6e8521 100644 --- a/main.go +++ b/main.go @@ -32,7 +32,7 @@ func eventLoop(pinger *probing.Pinger, ticker *time.Ticker) { select { // Got signal. stop pinger and exit goroutine case s := <-sig: - fmt.Printf("Recived signal: %s, exiting.", s) + fmt.Printf("Recived signal: %s, exiting.\n", s) return // Ticker ticks. print stats. case <-ticker.C: From a4343fa706cb95ce95fd45769b5ba8578518c2fd Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Sat, 31 May 2025 17:34:38 +0200 Subject: [PATCH 19/22] README.md: minor fix --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 6a21d42..71dd48d 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,7 @@ This command sends UDP echo requests to example.com, stopping after 30 seconds ``` This command sends 8 ICMP echo requests to example.com, with a 1-second interval between pings. + NOTE: this requires root privileges ## License From b9c0d0b416a925cb8f243f2687307dd743bc065e Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Mon, 11 May 2026 17:33:52 +0200 Subject: [PATCH 20/22] main.go: no need to return as it's the last statement --- main.go | 1 - 1 file changed, 1 deletion(-) diff --git a/main.go b/main.go index d6e8521..679d133 100644 --- a/main.go +++ b/main.go @@ -90,6 +90,5 @@ func main() { fmt.Println("PING", pinger.Addr()) if err = pinger.Run(); err != nil { fmt.Println("Error:", err) - return } } From 26de4fa64730260bdb455908fe484c43e203fdbe Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Mon, 11 May 2026 17:35:28 +0200 Subject: [PATCH 21/22] v0.0.4 --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index 679d133..d3f7f20 100644 --- a/main.go +++ b/main.go @@ -57,7 +57,7 @@ func main() { getopt.Parse() if *version { - fmt.Println("Version 0.0.3") + fmt.Println("Version 0.0.4") os.Exit(0) } From 30cee15b1986ab6cab773e0bdfcb4997a2661869 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Mon, 11 May 2026 18:07:14 +0200 Subject: [PATCH 22/22] LICENSE: update copyright year to 2026 --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 349c2d8..965f691 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2023-2025 Henrik Hautakoski +Copyright (c) 2023-2026 Henrik Hautakoski Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal