Files
wehub-resource-sync 6cf6f95f58
CodeQL / Analyze (push) Has been cancelled
Sync to Gitee / Run (push) Has been cancelled
Go / build & test (1.25.x) (push) Has been cancelled
Go / build & test (1.26.x) (push) Has been cancelled
Lint / resolve module (push) Has been cancelled
Lint / lint module (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:39:43 +08:00

30 lines
472 B
Go

package xml
import (
"encoding/xml"
"github.com/go-kratos/kratos/v3/encoding"
)
// Name is the name registered for the xml codec.
const Name = "xml"
func init() {
encoding.RegisterCodec(codec{})
}
// codec is a Codec implementation with xml.
type codec struct{}
func (codec) Marshal(v any) ([]byte, error) {
return xml.Marshal(v)
}
func (codec) Unmarshal(data []byte, v any) error {
return xml.Unmarshal(data, v)
}
func (codec) Name() string {
return Name
}