diff --git a/helm/data_helm_template.go b/helm/data_helm_template.go index 3e439d52f..b7b8be8db 100644 --- a/helm/data_helm_template.go +++ b/helm/data_helm_template.go @@ -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() @@ -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)) @@ -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() diff --git a/helm/resource_helm_release.go b/helm/resource_helm_release.go index 39473b406..12506b0e6 100644 --- a/helm/resource_helm_release.go +++ b/helm/resource_helm_release.go @@ -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 @@ -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() @@ -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) } @@ -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)) @@ -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() @@ -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))