Remove unused variables

This commit is contained in:
Zoltán Papp
2024-08-07 11:19:47 +02:00
parent b380f17064
commit 2f848cc51b
2 changed files with 7 additions and 11 deletions
+4 -6
View File
@@ -16,12 +16,10 @@ import (
// Route53TLS by default, loads the AWS configuration from the environment. // Route53TLS by default, loads the AWS configuration from the environment.
// env variables: AWS_REGION, AWS_PROFILE, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN // env variables: AWS_REGION, AWS_PROFILE, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN
type Route53TLS struct { type Route53TLS struct {
DataDir string DataDir string
Email string Email string
AwsAccessKeyID string Domains []string
AwsSecretAccessKey string CA string
Domains []string
CA string
} }
func (r *Route53TLS) GetCertificate() (*tls.Config, error) { func (r *Route53TLS) GetCertificate() (*tls.Config, error) {
+3 -5
View File
@@ -13,11 +13,9 @@ func TestRoute53TLSConfig(t *testing.T) {
t.SkipNow() // This test requires AWS credentials t.SkipNow() // This test requires AWS credentials
exampleString := "Hello, world!" exampleString := "Hello, world!"
rtls := &Route53TLS{ rtls := &Route53TLS{
DataDir: t.TempDir(), DataDir: t.TempDir(),
Email: os.Getenv("AWS_EMAIL"), Email: os.Getenv("LE_EMAIL_ROUTE53"),
AwsAccessKeyID: os.Getenv("AWS_KEY"), Domains: []string{os.Getenv("DOMAIN")},
AwsSecretAccessKey: os.Getenv("AWS_SECRET"),
Domains: []string{os.Getenv("DOMAIN")},
} }
tlsConfig, err := rtls.GetCertificate() tlsConfig, err := rtls.GetCertificate()
if err != nil { if err != nil {