[PR #2936] [CLOSED] fix: compilation error in auth_test.go - CreatePreAuthKey expects pointer #2944

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

📋 Pull Request Information

Original PR: https://github.com/juanfont/headscale/pull/2936
Author: @roganlynch
Created: 12/6/2025
Status: Closed

Base: mainHead: pr0-fix-auth-test-compilation-error


📝 Commits (1)

  • 924d35c Fix auth_test.go compilation error: CreatePreAuthKey expects pointer

📊 Changes

1 file changed (+2 additions, -1 deletions)

View changed files

📝 hscontrol/auth_test.go (+2 -1)

📄 Description

Fixes a compilation error in hscontrol/auth_test.go where CreatePreAuthKey was being called with a value instead of a pointer.

Changes

  • Updated test at line 3237 to pass *types.UserID (pointer) instead of types.UserID (value)
  • Creates a userID variable and passes its address to match the function signature

Error Fixed

cannot use types.UserID(user.ID) (value of type types.UserID) as
*types.UserID value in argument to app.state.CreatePreAuthKey

Context

This is part of the work discussed in #2902 to add ping functionality to headscale.


Note: This code was generated with assistance from Claude Sonnet 4.5 via cline.bot


🔄 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/2936 **Author:** [@roganlynch](https://github.com/roganlynch) **Created:** 12/6/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `pr0-fix-auth-test-compilation-error` --- ### 📝 Commits (1) - [`924d35c`](https://github.com/juanfont/headscale/commit/924d35c5e68f6442a863cdd95094c23f70503bad) Fix auth_test.go compilation error: CreatePreAuthKey expects pointer ### 📊 Changes **1 file changed** (+2 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `hscontrol/auth_test.go` (+2 -1) </details> ### 📄 Description Fixes a compilation error in `hscontrol/auth_test.go` where `CreatePreAuthKey` was being called with a value instead of a pointer. ## Changes - Updated test at line 3237 to pass `*types.UserID` (pointer) instead of `types.UserID` (value) - Creates a `userID` variable and passes its address to match the function signature ## Error Fixed ``` cannot use types.UserID(user.ID) (value of type types.UserID) as *types.UserID value in argument to app.state.CreatePreAuthKey ``` ## Context This is part of the work discussed in #2902 to add ping functionality to headscale. --- *Note: This code was generated with assistance from Claude Sonnet 4.5 via cline.bot* --- <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 04:19:45 +01:00
adam closed this issue 2025-12-29 04:19:45 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#2944