mirror of
https://github.com/caddyserver/caddy.git
synced 2024-12-27 06:03:48 +03:00
celmatcher: Implement pkix.Name
conversion to string (#5492)
This commit is contained in:
parent
998c6e06a7
commit
b301a3df70
1 changed files with 4 additions and 1 deletions
|
@ -255,7 +255,10 @@ type celPkixName struct{ *pkix.Name }
|
|||
func (pn celPkixName) ConvertToNative(typeDesc reflect.Type) (any, error) {
|
||||
return pn.Name, nil
|
||||
}
|
||||
func (celPkixName) ConvertToType(typeVal ref.Type) ref.Val {
|
||||
func (pn celPkixName) ConvertToType(typeVal ref.Type) ref.Val {
|
||||
if typeVal.TypeName() == "string" {
|
||||
return types.String(pn.Name.String())
|
||||
}
|
||||
panic("not implemented")
|
||||
}
|
||||
func (pn celPkixName) Equal(other ref.Val) ref.Val {
|
||||
|
|
Loading…
Reference in a new issue