From be44ebb25637ad24be42924f82474d131eb4ee41 Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Tue, 27 Aug 2019 10:30:25 +0100 Subject: [PATCH] Add check for httpclient.New() --- cmd/check/sdk_refs.go | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/cmd/check/sdk_refs.go b/cmd/check/sdk_refs.go index c329e53..b16da8c 100644 --- a/cmd/check/sdk_refs.go +++ b/cmd/check/sdk_refs.go @@ -31,17 +31,22 @@ var deprecations = []*identDeprecation{ { "github.com/hashicorp/terraform/httpclient", ast.NewIdent("UserAgentString"), - "Please don't use this", + "This function has been removed, please use httpclient.TerraformUserAgent(version) instead", + }, + { + "github.com/hashicorp/terraform/httpclient", + ast.NewIdent("New"), + "This function has been removed, please use DefaultPooledClient() with custom Transport/round-tripper from github.com/hashicorp/go-cleanhttp instead", }, { "github.com/hashicorp/terraform/terraform", ast.NewIdent("UserAgentString"), - "Please don't use this", + "This function has been removed, please use httpclient.TerraformUserAgent(version) instead", }, { "github.com/hashicorp/terraform/terraform", ast.NewIdent("VersionString"), - "Please don't use this", + "This function has been removed, please use helper/schema's Provider.TerraformVersion available from Provider.ConfigureFunc", }, { "github.com/hashicorp/terraform/config",