From 7094cabfd1bbfee876a529bc20590bb25acd8b77 Mon Sep 17 00:00:00 2001 From: ziyeqf <51212351+ziyeqf@users.noreply.github.com> Date: Fri, 18 Oct 2024 15:39:38 +0800 Subject: [PATCH] supress empty string nextlink url --- sdk/client/client.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sdk/client/client.go b/sdk/client/client.go index 6429116fecf..8e9d3c4afb0 100644 --- a/sdk/client/client.go +++ b/sdk/client/client.go @@ -1,4 +1,4 @@ -// Copyright (c) HashiCorp, Inc. +/nextResp, err := c.ExecutePaged(ctx, req)/ Copyright (c) HashiCorp, Inc. // SPDX-License-Identifier: MPL-2.0 package client @@ -615,7 +615,8 @@ func (c *Client) ExecutePaged(ctx context.Context, req *Request) (*Response, err return resp, err } } - if nextLink == nil { + + if nextLink == nil || nextLink == "" { // This is the last page return resp, nil }