Remove useless comment

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
Bryan Frimin
2026-03-06 11:16:50 +01:00
parent d209716d95
commit f33a1fe149
14 changed files with 7 additions and 43 deletions

View File

@@ -23,19 +23,14 @@ import (
"go.probo.inc/probo/pkg/probod"
)
// EnvGetter is a function that retrieves environment variables.
// This allows for easy testing by injecting a mock implementation.
type EnvGetter func(key string) string
// Builder creates a Config from environment variables.
type Builder struct {
getEnv EnvGetter
samlCertificate string
samlPrivateKey string
}
// NewBuilder creates a new Builder with the given environment getter.
// If getEnv is nil, os.Getenv is used.
func NewBuilder(getEnv EnvGetter) *Builder {
if getEnv == nil {
getEnv = os.Getenv
@@ -43,15 +38,11 @@ func NewBuilder(getEnv EnvGetter) *Builder {
return &Builder{getEnv: getEnv}
}
// SetSAMLCredentials sets pre-generated SAML certificate and private key.
// If not set, they will be generated automatically if not provided via environment.
func (b *Builder) SetSAMLCredentials(certificate, privateKey string) {
b.samlCertificate = certificate
b.samlPrivateKey = privateKey
}
// Build creates a FullConfig from environment variables.
// Returns an error if required environment variables are missing.
func (b *Builder) Build() (*probod.FullConfig, error) {
if err := b.validateRequired(); err != nil {
return nil, err

View File

@@ -23,8 +23,6 @@ import (
"gopkg.in/yaml.v3"
)
// WriteConfig writes the configuration to the specified path as YAML.
// It creates the parent directory if it doesn't exist.
func WriteConfig(cfg *probod.FullConfig, path string) error {
dir := filepath.Dir(path)
if err := os.MkdirAll(dir, 0755); err != nil {