kubescape / storage

Apache License 2.0
1 stars 6 forks source link

use utilsmetadata.LoadConfig to parse clusterData #40

Closed matthyx closed 1 year ago

matthyx commented 1 year ago

PR Type:

Refactoring


PR Description:

This PR refactors the way the cluster configuration is loaded in the main.go file. Instead of using the local config.LoadConfig function, it now uses the utilsmetadata.LoadConfig function from the utils-k8s-go package. This change simplifies the code and improves maintainability by relying on a shared utility function. The PR also includes updates to the project dependencies in go.mod and go.sum files, and removes the now redundant config.go file.


PR Main Files Walkthrough:

main.go: Replaced the use of config.LoadConfig with utilsmetadata.LoadConfig for loading the cluster configuration. The config package is no longer used in this file. go.mod: Added github.com/armosec/utils-k8s-go as a new dependency and updated other dependencies. pkg/config/config.go: This file was deleted as it's no longer needed after the refactoring. The LoadConfig function it contained has been replaced by utilsmetadata.LoadConfig.


User Description:

Sorry, we do not accept changes directly against this repository. Please see CONTRIBUTING.md for information on where and how to contribute instead.

codiumai-pr-agent[bot] commented 1 year ago

PR Analysis

How to use

To invoke the PR-Agent, add a comment using one of the following commands: /review [-i]: Request a review of your Pull Request. For an incremental review, which only considers changes since the last review, include the '-i' option. /describe: Modify the PR title and description based on the contents of the PR. /improve [--extended]: Suggest improvements to the code in the PR. Extended mode employs several calls, and provides a more thorough feedback. /ask \<QUESTION>: Pose a question about the PR. /update_changelog: Update the changelog based on the PR's contents.

To edit any configuration parameter from configuration.toml, add --config_path=new_value For example: /review --pr_reviewer.extra_instructions="focus on the file: ..." To list the possible configuration parameters, use the /config command.

github-actions[bot] commented 1 year ago

Summary: