mirror of
https://github.com/aykhans/dodo.git
synced 2025-09-05 10:43:37 +00:00
Here we go again...
This commit is contained in:
23
pkg/types/body.go
Normal file
23
pkg/types/body.go
Normal file
@@ -0,0 +1,23 @@
|
||||
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)
|
||||
}
|
Reference in New Issue
Block a user