Skip to content

Commit

Permalink
Use CSV split function instead of strings.Split
Browse files Browse the repository at this point in the history
Signed-off-by: nzbr <[email protected]>
  • Loading branch information
nzbr committed Apr 2, 2024
1 parent fda8600 commit a29b355
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/requestgen/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import (

cmapi "github.com/cert-manager/cert-manager/pkg/apis/certmanager/v1"
cmmeta "github.com/cert-manager/cert-manager/pkg/apis/meta/v1"
cmutil "github.com/cert-manager/cert-manager/pkg/util"
cmpki "github.com/cert-manager/cert-manager/pkg/util/pki"
"github.com/cert-manager/csi-lib/manager"
"github.com/cert-manager/csi-lib/metadata"
Expand Down Expand Up @@ -95,7 +96,10 @@ func RequestForMetadata(meta metadata.Metadata) (*manager.CertificateRequestBund
if err != nil {
return nil, fmt.Errorf("%q: %w", v, err)
}
*k = strings.Split(e, ",")
*k, err = cmutil.SplitWithEscapeCSV(e)
if err != nil {
return nil, fmt.Errorf("%q: %w", v, err)
}
}
}
}
Expand Down

0 comments on commit a29b355

Please sign in to comment.