[PR #784] [MERGED] Fix linting broken after Go 1.19 #1645

Closed
opened 2025-12-29 02:31:04 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/juanfont/headscale/pull/784
Author: @juanfont
Created: 9/4/2022
Status: Merged
Merged: 9/4/2022
Merged by: @juanfont

Base: mainHead: fix-go-1.19-lint


📝 Commits (10+)

  • ca0be81 Target the latest version for golint
  • 68305df Applied gofumpt
  • f4d1974 Use library const for HTTP verbs
  • 5821228 Go do not like underscores in packages
  • 9a1438d Use inherited context
  • c1c3603 Add timeouts for the Noise server
  • f2fda4f Return error on marshaling issues
  • 0d074b1 setLastStateChangeToNow was always receiving nil
  • e0857f0 Removed unused parameters in protocol functions
  • 4527801 More unused parameters removed in protocol functions

📊 Changes

16 files changed (+52 additions, -49 deletions)

View changed files

📝 .github/workflows/lint.yml (+1 -1)
📝 acls_test.go (+0 -1)
📝 api.go (+1 -1)
📝 app.go (+19 -12)
📝 config.go (+1 -2)
📝 db.go (+2 -2)
📝 derp.go (+1 -1)
📝 derp_server.go (+3 -3)
📝 machine_test.go (+0 -1)
📝 noise.go (+3 -1)
📝 oidc.go (+6 -4)
📝 protocol_common.go (+7 -14)
📝 protocol_common_poll.go (+4 -4)
📝 protocol_common_utils.go (+2 -0)
📝 protocol_legacy_poll.go (+1 -1)
📝 protocol_noise_poll.go (+1 -1)

📄 Description

The move to Go 1.19 has broken golanglint, as the current version we use does not support 1.19.

Upgrading to golanglint-ci v1.49.0 brings new linters and strictness (is this a word?). This PR does the switch and fixes some stuff the new linter points out.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/juanfont/headscale/pull/784 **Author:** [@juanfont](https://github.com/juanfont) **Created:** 9/4/2022 **Status:** ✅ Merged **Merged:** 9/4/2022 **Merged by:** [@juanfont](https://github.com/juanfont) **Base:** `main` ← **Head:** `fix-go-1.19-lint` --- ### 📝 Commits (10+) - [`ca0be81`](https://github.com/juanfont/headscale/commit/ca0be818331baac40b5fa1af185b846cd675385f) Target the latest version for golint - [`68305df`](https://github.com/juanfont/headscale/commit/68305df9b20ede9756bdd6f726ddb8847ca38a7f) Applied gofumpt - [`f4d1974`](https://github.com/juanfont/headscale/commit/f4d197485ce0fcee0407e08fb1024d4c26ebeefb) Use library const for HTTP verbs - [`5821228`](https://github.com/juanfont/headscale/commit/582122851d572b46126639e04160049c507684c7) Go do not like underscores in packages - [`9a1438d`](https://github.com/juanfont/headscale/commit/9a1438d2e3916a5fde656e145f32536118338d44) Use inherited context - [`c1c3603`](https://github.com/juanfont/headscale/commit/c1c36036ae590f7e238da1418b21fdd0c91e9431) Add timeouts for the Noise server - [`f2fda4f`](https://github.com/juanfont/headscale/commit/f2fda4f90670e959ba784c4cdd56ad3a03a634fd) Return error on marshaling issues - [`0d074b1`](https://github.com/juanfont/headscale/commit/0d074b1da6aabf0e67b702f3acce0b7838ead582) setLastStateChangeToNow was always receiving nil - [`e0857f0`](https://github.com/juanfont/headscale/commit/e0857f022661f6c8e97a3c9562485f9444feffdc) Removed unused parameters in protocol functions - [`4527801`](https://github.com/juanfont/headscale/commit/4527801d48a64e8055c537503efefbffb7820713) More unused parameters removed in protocol functions ### 📊 Changes **16 files changed** (+52 additions, -49 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/lint.yml` (+1 -1) 📝 `acls_test.go` (+0 -1) 📝 `api.go` (+1 -1) 📝 `app.go` (+19 -12) 📝 `config.go` (+1 -2) 📝 `db.go` (+2 -2) 📝 `derp.go` (+1 -1) 📝 `derp_server.go` (+3 -3) 📝 `machine_test.go` (+0 -1) 📝 `noise.go` (+3 -1) 📝 `oidc.go` (+6 -4) 📝 `protocol_common.go` (+7 -14) 📝 `protocol_common_poll.go` (+4 -4) 📝 `protocol_common_utils.go` (+2 -0) 📝 `protocol_legacy_poll.go` (+1 -1) 📝 `protocol_noise_poll.go` (+1 -1) </details> ### 📄 Description The move to Go 1.19 has broken golanglint, as the current version we use does not support 1.19. Upgrading to golanglint-ci v1.49.0 brings new linters and strictness (is this a word?). This PR does the switch and fixes some stuff the new linter points out. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 02:31:04 +01:00
adam closed this issue 2025-12-29 02:31:04 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#1645