Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions helm/data_helm_template.go
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,7 @@ func isTestHook(h *release.Hook) bool {
return false
}

func chartPathOptionsModel(model *HelmTemplateModel, meta *Meta, cpo *action.ChartPathOptions) (*action.ChartPathOptions, string, diag.Diagnostics) {
func chartPathOptionsModel(model *HelmTemplateModel, _ *Meta, cpo *action.ChartPathOptions) (*action.ChartPathOptions, string, diag.Diagnostics) {
var diags diag.Diagnostics
chartName := model.Chart.ValueString()
repository := model.Repository.ValueString()
Expand Down Expand Up @@ -863,7 +863,7 @@ func getVersionModel(model *HelmTemplateModel) string {
return strings.TrimSpace(version)
}

func getChartModel(ctx context.Context, model *HelmTemplateModel, meta *Meta, name string, cpo *action.ChartPathOptions) (*chart.Chart, string, diag.Diagnostics) {
func getChartModel(ctx context.Context, _ *HelmTemplateModel, meta *Meta, name string, cpo *action.ChartPathOptions) (*chart.Chart, string, diag.Diagnostics) {
var diags diag.Diagnostics

tflog.Debug(ctx, fmt.Sprintf("Helm settings: %+v", meta.Settings))
Expand Down Expand Up @@ -949,7 +949,7 @@ func applySetValue(base map[string]interface{}, set SetValue) diag.Diagnostics {
return diags
}

func applySetListValue(ctx context.Context, base map[string]interface{}, setList SetListValue) diag.Diagnostics {
func applySetListValue(_ context.Context, base map[string]interface{}, setList SetListValue) diag.Diagnostics {
var diags diag.Diagnostics

name := setList.Name.ValueString()
Expand Down
12 changes: 6 additions & 6 deletions helm/resource_helm_release.go
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@ func mergeMaps(a, b map[string]interface{}) map[string]interface{} {
return out
}

func getInstalledReleaseVersion(ctx context.Context, m *Meta, cfg *action.Configuration, name string) (string, error) {
func getInstalledReleaseVersion(ctx context.Context, _ *Meta, cfg *action.Configuration, name string) (string, error) {
logID := fmt.Sprintf("[getInstalledReleaseVersion: %s]", name)
histClient := action.NewHistory(cfg)
histClient.Max = 1
Expand Down Expand Up @@ -1249,7 +1249,7 @@ func (r *HelmRelease) Delete(ctx context.Context, req resource.DeleteRequest, re
}
}

func chartPathOptions(model *HelmReleaseModel, meta *Meta, cpo *action.ChartPathOptions) (*action.ChartPathOptions, string, diag.Diagnostics) {
func chartPathOptions(model *HelmReleaseModel, _ *Meta, cpo *action.ChartPathOptions) (*action.ChartPathOptions, string, diag.Diagnostics) {
var diags diag.Diagnostics
chartName := model.Chart.ValueString()
repository := model.Repository.ValueString()
Expand Down Expand Up @@ -1315,7 +1315,7 @@ func buildChartNameWithRepository(repository, name string) (string, string, erro
return repository, name, nil
}

if strings.Index(name, "/") == -1 && repository != "" {
if !strings.Contains(name, "/") && repository != "" {
name = fmt.Sprintf("%s/%s", repository, name)
}

Expand All @@ -1338,7 +1338,7 @@ func isChartInstallable(ch *chart.Chart) error {
return errors.Errorf("%s charts are not installable", ch.Metadata.Type)
}

func getChart(ctx context.Context, model *HelmReleaseModel, m *Meta, name string, cpo *action.ChartPathOptions) (*chart.Chart, string, diag.Diagnostics) {
func getChart(ctx context.Context, _ *HelmReleaseModel, m *Meta, name string, cpo *action.ChartPathOptions) (*chart.Chart, string, diag.Diagnostics) {
var diags diag.Diagnostics

tflog.Debug(ctx, fmt.Sprintf("Helm settings: %+v", m.Settings))
Expand Down Expand Up @@ -1576,7 +1576,7 @@ func cloakSetValues(config map[string]interface{}, state *HelmReleaseModel) {
}
}

func getListValue(ctx context.Context, base map[string]interface{}, set set_listResourceModel) diag.Diagnostics {
func getListValue(_ context.Context, base map[string]interface{}, set set_listResourceModel) diag.Diagnostics {
var diags diag.Diagnostics

name := set.Name.ValueString()
Expand Down Expand Up @@ -1787,7 +1787,7 @@ func resourceReleaseExists(ctx context.Context, name, namespace string, meta *Me
var errReleaseNotFound = fmt.Errorf("release: not found")

// c
func getRelease(ctx context.Context, m *Meta, cfg *action.Configuration, name string) (*release.Release, error) {
func getRelease(ctx context.Context, _ *Meta, cfg *action.Configuration, name string) (*release.Release, error) {
get := action.NewGet(cfg)
tflog.Debug(ctx, fmt.Sprintf("%s getRelease post action created", name))

Expand Down