mirror of
https://github.com/caddyserver/caddy.git
synced 2024-11-22 12:08:28 +08:00
celmatcher: Implement pkix.Name
conversion to string (#5492)
This commit is contained in:
parent
998c6e06a7
commit
b301a3df70
|
@ -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 New Issue
Block a user