(path string, summary ...string)
| 259 | } |
| 260 | |
| 261 | func NewFileImage(path string, summary ...string) (*ImageElement, error) { |
| 262 | img, err := os.Open(path) |
| 263 | if err != nil { |
| 264 | return nil, err |
| 265 | } |
| 266 | return NewStreamImage(img, summary...), nil |
| 267 | } |
| 268 | |
| 269 | func NewVideo(data, thumb []byte, summary ...string) *ShortVideoElement { |
| 270 | return NewStreamVideo(bytes.NewReader(data), bytes.NewReader(thumb), summary...) |
no test coverage detected