diff options
| author | mo khan <mo@mokhan.ca> | 2025-03-13 10:04:25 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2025-03-13 10:04:25 -0600 |
| commit | 857af592cfa293b1cd6821c26a91e5a9be5bc19c (patch) | |
| tree | dd18fbcbb541761b44924ac04789c2a0f3ecf70c /pkg | |
| parent | d442b7707b35b3daea890b4d35a2a0d564abdd5c (diff) | |
refactor: extract WithRoutes config option
Diffstat (limited to 'pkg')
| -rw-r--r-- | pkg/cfg/tls.go | 4 |
1 files changed, 2 insertions, 2 deletions
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}, |
