25 lines
395 B
Go
25 lines
395 B
Go
package output
|
|
|
|
import (
|
|
"fmt"
|
|
)
|
|
|
|
type stdoutput struct {
|
|
}
|
|
|
|
func StdOutput() *stdoutput {
|
|
return &stdoutput{}
|
|
}
|
|
|
|
func (so *stdoutput) Write(str string, images []Image) error {
|
|
fmt.Println(str)
|
|
for _, img := range images {
|
|
fmt.Printf("[image: %s (%s, %d bytes)]\n", img.Filename, img.ContentType, len(img.Data))
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (so *stdoutput) GetName() string {
|
|
return "stdout"
|
|
}
|