mirror of
https://github.com/aykhans/dodo.git
synced 2025-09-01 00:53:34 +00:00
24 lines
386 B
Go
24 lines
386 B
Go
package types
|
|
|
|
type Body string
|
|
|
|
func (body Body) String() string {
|
|
return string(body)
|
|
}
|
|
|
|
type Bodies []Body
|
|
|
|
func (bodies *Bodies) Append(body Body) {
|
|
*bodies = append(*bodies, body)
|
|
}
|
|
|
|
func (bodies *Bodies) Parse(rawValues ...string) {
|
|
for _, rawValue := range rawValues {
|
|
bodies.Append(ParseBody(rawValue))
|
|
}
|
|
}
|
|
|
|
func ParseBody(rawValue string) Body {
|
|
return Body(rawValue)
|
|
}
|