From 857af592cfa293b1cd6821c26a91e5a9be5bc19c Mon Sep 17 00:00:00 2001 From: mo khan Date: Thu, 13 Mar 2025 10:04:25 -0600 Subject: refactor: extract WithRoutes config option --- pkg/cfg/tls.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pkg') diff --git a/pkg/cfg/tls.go b/pkg/cfg/tls.go index 6414b250..6441df8f 100644 --- a/pkg/cfg/tls.go +++ b/pkg/cfg/tls.go @@ -6,10 +6,10 @@ import ( "github.com/xlgmokha/x/pkg/x" ) -func WithSelfSigned(cert, key string) cfg.Option { +func WithSelfSigned(cert, key string) Option { certificate := x.Must(tls.LoadX509KeyPair(cert, key)) - return func(config *cfg.Config) { + return func(config *Config) { config.TLS = &tls.Config{ MinVersion: tls.VersionTLS13, Certificates: []tls.Certificate{certificate}, -- cgit v1.2.3