[PR #710] [MERGED] Config cleaning #12910

Closed
opened 2026-08-05 02:06:59 -04:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/710
Author: @pappz
Created: 3/1/2023
Status: Merged
Merged: 3/2/2023
Merged by: @pappz

Base: mainHead: config-cleaning


📝 Commits (9)

  • af0c4a4 Move device auth flow code into new go file
  • b96df6b Eliminate config dependency in device auth flow
  • 0c52ddc Source code organisation
  • 15f8794 Set to unexported the ParserUrl function
  • ef9543e Rename ReadConfig to UpdateConfig
  • a703d45 Add helper function to check config file's state
  • 51327a4 Decompose config file update check and steps
  • 806d4e9 Fix lint
  • 35f277b Fix codacy issues

📊 Changes

8 files changed (+225 additions, -200 deletions)

View changed files

📝 client/cmd/login.go (+4 -3)
📝 client/cmd/ssh.go (+8 -6)
📝 client/cmd/up.go (+10 -8)
📝 client/internal/config.go (+61 -157)
📝 client/internal/config_test.go (+6 -6)
📝 client/internal/connect.go (+9 -11)
client/internal/device_auth.go (+119 -0)
📝 client/server/server.go (+8 -9)

📄 Description

Describe your changes

Code cleaning in the config.go of the client. This change keep the
logic in original state. The name of the exported function was not
covered well the internal workflow. Without read the comment was not
understandable what is the difference between the GetConfig and
ReadConfig. By the way both of them doing write operation.

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)
  • Extended the README / documentation, if necessary

🔄 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/netbirdio/netbird/pull/710 **Author:** [@pappz](https://github.com/pappz) **Created:** 3/1/2023 **Status:** ✅ Merged **Merged:** 3/2/2023 **Merged by:** [@pappz](https://github.com/pappz) **Base:** `main` ← **Head:** `config-cleaning` --- ### 📝 Commits (9) - [`af0c4a4`](https://github.com/netbirdio/netbird/commit/af0c4a4f3713736b4fd8f347b91624ed59a101ff) Move device auth flow code into new go file - [`b96df6b`](https://github.com/netbirdio/netbird/commit/b96df6ba9b3ed0a4a9f1e77fdb0b24676cf12b12) Eliminate config dependency in device auth flow - [`0c52ddc`](https://github.com/netbirdio/netbird/commit/0c52ddc353316748fd2cc2b43f257259f30c5503) Source code organisation - [`15f8794`](https://github.com/netbirdio/netbird/commit/15f87949280dbac83c8ba276b678d94945a78a06) Set to unexported the ParserUrl function - [`ef9543e`](https://github.com/netbirdio/netbird/commit/ef9543ee7084656f38508ff7dcfa137a6ad6d3c6) Rename ReadConfig to UpdateConfig - [`a703d45`](https://github.com/netbirdio/netbird/commit/a703d4562e7a4a50d9985c79160ef065771e2baa) Add helper function to check config file's state - [`51327a4`](https://github.com/netbirdio/netbird/commit/51327a45e41f4469ff62abdb768a8f3ce671c087) Decompose config file update check and steps - [`806d4e9`](https://github.com/netbirdio/netbird/commit/806d4e9efe47a307fc4e2ff353a2e8f9c2e4efd5) Fix lint - [`35f277b`](https://github.com/netbirdio/netbird/commit/35f277bd4c9dacd9fdfecad72f348d7104e7e340) Fix codacy issues ### 📊 Changes **8 files changed** (+225 additions, -200 deletions) <details> <summary>View changed files</summary> 📝 `client/cmd/login.go` (+4 -3) 📝 `client/cmd/ssh.go` (+8 -6) 📝 `client/cmd/up.go` (+10 -8) 📝 `client/internal/config.go` (+61 -157) 📝 `client/internal/config_test.go` (+6 -6) 📝 `client/internal/connect.go` (+9 -11) ➕ `client/internal/device_auth.go` (+119 -0) 📝 `client/server/server.go` (+8 -9) </details> ### 📄 Description ## Describe your changes Code cleaning in the config.go of the client. This change keep the logic in original state. The name of the exported function was not covered well the internal workflow. Without read the comment was not understandable what is the difference between the GetConfig and ReadConfig. By the way both of them doing write operation. ## Issue ticket number and link ### Checklist - [ ] Is it a bug fix - [ ] Is a typo/documentation fix - [ ] Is a feature enhancement - [x] It is a refactor - [ ] Created tests that fail without the change (if possible) - [ ] Extended the README / documentation, if necessary --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
saavagebueno added the pull-request label 2026-08-05 02:06:59 -04:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#12910