mirror of
https://github.com/go-acme/lego
synced 2026-03-14 14:35:48 +01:00
refactor: move ptr package
This commit is contained in:
parent
c2db871ea6
commit
e6d574f6ad
17 changed files with 17 additions and 20 deletions
|
|
@ -150,8 +150,3 @@ func ParseIssueValue(value string) (IssueValue, error) {
|
|||
|
||||
return parsed, nil
|
||||
}
|
||||
|
||||
// Pointer returns a pointer to v.
|
||||
// TODO(ldez) factorize.
|
||||
// TODO(ldez) it must be replaced with the builtin 'new' function when min Go 1.26.
|
||||
func Pointer[T any](v T) *T { return &v }
|
||||
|
|
|
|||
|
|
@ -9,4 +9,6 @@ func Deref[T any](v *T) T {
|
|||
return *v
|
||||
}
|
||||
|
||||
// Pointer returns a pointer to v.
|
||||
// TODO(ldez) it must be replaced with the builtin 'new' function when min Go 1.26.
|
||||
func Pointer[T any](v T) *T { return &v }
|
||||
|
|
@ -13,8 +13,8 @@ import (
|
|||
alidns "github.com/go-acme/alidns-20150109/v4/client"
|
||||
"github.com/go-acme/lego/v5/challenge"
|
||||
"github.com/go-acme/lego/v5/challenge/dns01"
|
||||
"github.com/go-acme/lego/v5/internal/ptr"
|
||||
"github.com/go-acme/lego/v5/platform/config/env"
|
||||
"github.com/go-acme/lego/v5/providers/dns/internal/ptr"
|
||||
"golang.org/x/net/idna"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -13,8 +13,8 @@ import (
|
|||
"github.com/aliyun/credentials-go/credentials"
|
||||
esa "github.com/go-acme/esa-20240910/v2/client"
|
||||
"github.com/go-acme/lego/v5/challenge/dns01"
|
||||
"github.com/go-acme/lego/v5/internal/ptr"
|
||||
"github.com/go-acme/lego/v5/platform/config/env"
|
||||
"github.com/go-acme/lego/v5/providers/dns/internal/ptr"
|
||||
)
|
||||
|
||||
// Environment variables names.
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import (
|
|||
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/privatedns/armprivatedns"
|
||||
"github.com/go-acme/lego/v5/challenge"
|
||||
"github.com/go-acme/lego/v5/challenge/dns01"
|
||||
"github.com/go-acme/lego/v5/providers/dns/internal/ptr"
|
||||
"github.com/go-acme/lego/v5/internal/ptr"
|
||||
)
|
||||
|
||||
var _ challenge.ProviderTimeout = (*DNSProviderPrivate)(nil)
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import (
|
|||
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dns/armdns"
|
||||
"github.com/go-acme/lego/v5/challenge"
|
||||
"github.com/go-acme/lego/v5/challenge/dns01"
|
||||
"github.com/go-acme/lego/v5/providers/dns/internal/ptr"
|
||||
"github.com/go-acme/lego/v5/internal/ptr"
|
||||
)
|
||||
|
||||
var _ challenge.ProviderTimeout = (*DNSProviderPublic)(nil)
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import (
|
|||
"github.com/Azure/azure-sdk-for-go/sdk/azcore/arm"
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/azcore/to"
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/resourcegraph/armresourcegraph"
|
||||
"github.com/go-acme/lego/v5/providers/dns/internal/ptr"
|
||||
"github.com/go-acme/lego/v5/internal/ptr"
|
||||
)
|
||||
|
||||
type ServiceDiscoveryZone struct {
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@ import (
|
|||
|
||||
baidudns "github.com/baidubce/bce-sdk-go/services/dns"
|
||||
"github.com/go-acme/lego/v5/challenge/dns01"
|
||||
"github.com/go-acme/lego/v5/internal/ptr"
|
||||
"github.com/go-acme/lego/v5/platform/config/env"
|
||||
"github.com/go-acme/lego/v5/providers/dns/internal/ptr"
|
||||
)
|
||||
|
||||
// Environment variables names.
|
||||
|
|
|
|||
|
|
@ -11,10 +11,10 @@ import (
|
|||
|
||||
"github.com/go-acme/lego/v5/challenge"
|
||||
"github.com/go-acme/lego/v5/challenge/dns01"
|
||||
"github.com/go-acme/lego/v5/internal/ptr"
|
||||
"github.com/go-acme/lego/v5/internal/useragent"
|
||||
"github.com/go-acme/lego/v5/platform/config/env"
|
||||
"github.com/go-acme/lego/v5/providers/dns/internal/clientdebug"
|
||||
"github.com/go-acme/lego/v5/providers/dns/internal/ptr"
|
||||
"github.com/nrdcg/bunny-go"
|
||||
"golang.org/x/net/publicsuffix"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ package bunny
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/go-acme/lego/v5/internal/ptr"
|
||||
"github.com/go-acme/lego/v5/platform/tester"
|
||||
"github.com/go-acme/lego/v5/providers/dns/internal/ptr"
|
||||
"github.com/nrdcg/bunny-go"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/go-acme/lego/v5/challenge/dns01"
|
||||
"github.com/go-acme/lego/v5/internal/ptr"
|
||||
"github.com/go-acme/lego/v5/platform/config/env"
|
||||
"github.com/go-acme/lego/v5/providers/dns/internal/ptr"
|
||||
teo "github.com/go-acme/tencentedgdeone/v20220901"
|
||||
"github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common"
|
||||
"github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common/profile"
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import (
|
|||
"fmt"
|
||||
|
||||
"github.com/go-acme/lego/v5/challenge/dns01"
|
||||
"github.com/go-acme/lego/v5/providers/dns/internal/ptr"
|
||||
"github.com/go-acme/lego/v5/internal/ptr"
|
||||
teo "github.com/go-acme/tencentedgdeone/v20220901"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -13,10 +13,10 @@ import (
|
|||
"github.com/cenkalti/backoff/v5"
|
||||
"github.com/go-acme/lego/v5/challenge"
|
||||
"github.com/go-acme/lego/v5/challenge/dns01"
|
||||
"github.com/go-acme/lego/v5/internal/ptr"
|
||||
"github.com/go-acme/lego/v5/platform/config/env"
|
||||
"github.com/go-acme/lego/v5/platform/wait"
|
||||
"github.com/go-acme/lego/v5/providers/dns/huaweicloud/internal"
|
||||
"github.com/go-acme/lego/v5/providers/dns/internal/ptr"
|
||||
hwauthbasic "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/auth/basic"
|
||||
hwconfig "github.com/huaweicloud/huaweicloud-sdk-go-v3/core/config"
|
||||
hwdns "github.com/huaweicloud/huaweicloud-sdk-go-v3/services/dns/v2"
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import (
|
|||
"github.com/aws/aws-sdk-go-v2/aws"
|
||||
awsconfig "github.com/aws/aws-sdk-go-v2/config"
|
||||
"github.com/aws/aws-sdk-go-v2/service/lightsail"
|
||||
"github.com/go-acme/lego/v5/providers/dns/internal/ptr"
|
||||
"github.com/go-acme/lego/v5/internal/ptr"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -20,9 +20,9 @@ import (
|
|||
"github.com/cenkalti/backoff/v5"
|
||||
"github.com/go-acme/lego/v5/challenge"
|
||||
"github.com/go-acme/lego/v5/challenge/dns01"
|
||||
"github.com/go-acme/lego/v5/internal/ptr"
|
||||
"github.com/go-acme/lego/v5/platform/config/env"
|
||||
"github.com/go-acme/lego/v5/platform/wait"
|
||||
"github.com/go-acme/lego/v5/providers/dns/internal/ptr"
|
||||
)
|
||||
|
||||
// Environment variables names.
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import (
|
|||
"github.com/aws/aws-sdk-go-v2/aws"
|
||||
awsconfig "github.com/aws/aws-sdk-go-v2/config"
|
||||
"github.com/aws/aws-sdk-go-v2/service/route53"
|
||||
"github.com/go-acme/lego/v5/providers/dns/internal/ptr"
|
||||
"github.com/go-acme/lego/v5/internal/ptr"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -11,8 +11,8 @@ import (
|
|||
|
||||
"github.com/go-acme/lego/v5/challenge"
|
||||
"github.com/go-acme/lego/v5/challenge/dns01"
|
||||
"github.com/go-acme/lego/v5/internal/ptr"
|
||||
"github.com/go-acme/lego/v5/platform/config/env"
|
||||
"github.com/go-acme/lego/v5/providers/dns/internal/ptr"
|
||||
"github.com/volcengine/volc-sdk-golang/base"
|
||||
volc "github.com/volcengine/volc-sdk-golang/service/dns"
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue