From 5864877f927926d109f79b86e812161f9102e7ab Mon Sep 17 00:00:00 2001 From: QuentinBisson Date: Tue, 27 Oct 2026 15:26:23 +0100 Subject: [PATCH] style: gofmt doc comments and sorted test imports --- doc.go | 14 +++++++++----- mockdata_test.go | 2 +- update/doc.go | 9 +++------ validate_test.go | 4 ++-- 4 files changed, 15 insertions(+), 14 deletions(-) diff --git a/doc.go b/doc.go index 2b1cc6b..c385b74 100644 --- a/doc.go +++ b/doc.go @@ -15,16 +15,20 @@ If newer version than itself is detected, it downloads released binary from GitH There are some naming rules. Please read following links. Naming Rules of Released Binaries: - https://github.com/creativeprojects/go-selfupdate#naming-rules-of-released-binaries + + https://github.com/creativeprojects/go-selfupdate#naming-rules-of-released-binaries Naming Rules of Git Tags: - https://github.com/creativeprojects/go-selfupdate#naming-rules-of-versions-git-tags + + https://github.com/creativeprojects/go-selfupdate#naming-rules-of-versions-git-tags This package is hosted on GitHub: - https://github.com/creativeprojects/go-selfupdate + + https://github.com/creativeprojects/go-selfupdate Small CLI tools as wrapper of this library are available also: - https://github.com/creativeprojects/go-selfupdate/cmd/detect-latest-release - https://github.com/creativeprojects/go-selfupdate/cmd/go-get-release + + https://github.com/creativeprojects/go-selfupdate/cmd/detect-latest-release + https://github.com/creativeprojects/go-selfupdate/cmd/go-get-release */ package selfupdate diff --git a/mockdata_test.go b/mockdata_test.go index 536826a..da9d03d 100644 --- a/mockdata_test.go +++ b/mockdata_test.go @@ -8,8 +8,8 @@ import ( "testing" "time" - "github.com/stretchr/testify/require" "github.com/ProtonMail/go-crypto/openpgp" + "github.com/stretchr/testify/require" ) // mockSourceRepository creates a new *MockSource pre-populated with different versions and assets diff --git a/update/doc.go b/update/doc.go index d1bc6c8..e17c906 100644 --- a/update/doc.go +++ b/update/doc.go @@ -1,7 +1,7 @@ /* Package update provides functionality to implement secure, self-updating Go programs (or other single-file targets). -Basic Example +# Basic Example This example shows how to update a program remotely from a URL. @@ -28,8 +28,7 @@ This example shows how to update a program remotely from a URL. return err } - -Checksum Verification +# Checksum Verification Updating executable code on a computer can be a dangerous operation unless you take the appropriate steps to guarantee the authenticity of the new code. While @@ -67,7 +66,7 @@ specified as a hex string. return err } -Cryptographic Signature Verification +# Cryptographic Signature Verification Cryptographic verification of new code from an update is an extremely important way to guarantee the security and integrity of your updates. @@ -120,7 +119,5 @@ with the private key and distribute the signature along with the update. } return err } - - */ package update diff --git a/validate_test.go b/validate_test.go index 9c8dc60..8a4c66c 100644 --- a/validate_test.go +++ b/validate_test.go @@ -11,10 +11,10 @@ import ( "os" "testing" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" "github.com/ProtonMail/go-crypto/openpgp" "github.com/ProtonMail/go-crypto/openpgp/armor" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) func TestValidatorAssetNames(t *testing.T) {