refactor(main): change config to envs #3121
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🤖 Generated by Copilot at 5a79e77
Summary
♻️✨🔥
Renamed the
config
package and command toenv
to better reflect its functionality of displaying and setting environment variables for sealos. Simplified the code and the output of theenv
command. Removed unused and redundant code related to configuration options.Walkthrough
config
package and command toenv
to display and set environment variables for sealos (link, link, link, link)Set
function andsetValue
method fromenv
package as they are no longer needed (link, link)ConfigOption
struct by removingAllowedValues
andOSEnv
fields and use constants for environment variable names (link, link, link)pkg/system/config_cmd.go
file as it is replaced bypkg/system/env_cmd.go
(link)NewExampleConfig
function inpkg/system/env_example.go
to generate a simpler template string for theenv
command long description (link)pkg/system/env_example_test.go
to match the new template string (link)