[PR #534] [MERGED] fix: Remove days from expiry option value examples #1461

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

📋 Pull Request Information

Original PR: https://github.com/juanfont/headscale/pull/534
Author: @nning
Created: 4/5/2022
Status: Merged
Merged: 4/6/2022
Merged by: @kradalby

Base: mainHead: main


📝 Commits (1)

  • b2ae9b6 fix: Remove days from expiry option value examples

📊 Changes

2 files changed (+2 additions, -2 deletions)

View changed files

📝 cmd/headscale/cli/api_key.go (+1 -1)
📝 cmd/headscale/cli/preauthkeys.go (+1 -1)

📄 Description

The -e option for preauthkeys create and apikeys create is processed with time.ParseDuration which does not support the d suffix (for days) and also no other "bigger" suffixes:

First I thought I could fix the CLI code but as it's just using cobra to read the expiration flag, I changed the documentation for the commands accepting the -e flag.


🔄 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/534 **Author:** [@nning](https://github.com/nning) **Created:** 4/5/2022 **Status:** ✅ Merged **Merged:** 4/6/2022 **Merged by:** [@kradalby](https://github.com/kradalby) **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (1) - [`b2ae9b6`](https://github.com/juanfont/headscale/commit/b2ae9b6cacc576d18bec905a05bbb29dd9ceff84) fix: Remove days from expiry option value examples ### 📊 Changes **2 files changed** (+2 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `cmd/headscale/cli/api_key.go` (+1 -1) 📝 `cmd/headscale/cli/preauthkeys.go` (+1 -1) </details> ### 📄 Description The `-e` option for `preauthkeys create` and `apikeys create` is processed with `time.ParseDuration` which does not support the `d` suffix (for days) and also no other "bigger" suffixes: * https://pkg.go.dev/time#ParseDuration * https://github.com/golang/go/issues/11473 First I thought I could fix the CLI code but as it's just using cobra to read the expiration flag, I changed the documentation for the commands accepting the `-e` flag. --- <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:30:09 +01:00
adam closed this issue 2025-12-29 02:30:09 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/headscale#1461