From 602f95aed4e802d39bb2d021814ed5bf3b53fb84 Mon Sep 17 00:00:00 2001 From: Adrian Stobbe Date: Thu, 28 Nov 2024 09:23:03 +0100 Subject: [PATCH] rename PlatformIssuer to New --- coordinator/main.go | 2 +- initializer/main.go | 2 +- internal/atls/issuer/issuer.go | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/coordinator/main.go b/coordinator/main.go index 802b82c189..5940c5b646 100644 --- a/coordinator/main.go +++ b/coordinator/main.go @@ -155,7 +155,7 @@ func newServerMetrics(reg *prometheus.Registry) *grpcprometheus.ServerMetrics { } func newGRPCServer(serverMetrics *grpcprometheus.ServerMetrics, log *slog.Logger) (*grpc.Server, error) { - issuer, err := issuer.PlatformIssuer(log) + issuer, err := issuer.New(log) if err != nil { return nil, fmt.Errorf("creating issuer: %w", err) } diff --git a/initializer/main.go b/initializer/main.go index 59882e4ea3..7235a49067 100644 --- a/initializer/main.go +++ b/initializer/main.go @@ -56,7 +56,7 @@ func run() (retErr error) { return fmt.Errorf("generating key: %w", err) } - issuer, err := issuer.PlatformIssuer(log) + issuer, err := issuer.New(log) if err != nil { return fmt.Errorf("creating issuer: %w", err) } diff --git a/internal/atls/issuer/issuer.go b/internal/atls/issuer/issuer.go index 3fec2573e9..df9185f879 100644 --- a/internal/atls/issuer/issuer.go +++ b/internal/atls/issuer/issuer.go @@ -15,8 +15,8 @@ import ( "github.com/klauspost/cpuid/v2" ) -// PlatformIssuer creates an attestation issuer for the current platform. -func PlatformIssuer(log *slog.Logger) (Issuer, error) { +// New creates an attestation issuer for the current platform. +func New(log *slog.Logger) (Issuer, error) { cpuid.Detect() switch { case cpuid.CPU.Supports(cpuid.SEV_SNP):