Files
tweetdistributor/output/stdout.go
2026-07-03 10:18:39 +09:00

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"
}