Initial commit.
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
package stdout
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"go.dev.pztrn.name/rsser/outputs"
|
||||
)
|
||||
|
||||
type stdout struct{}
|
||||
|
||||
// New creates new STDOUT output handler.
|
||||
func New() outputs.Output {
|
||||
return &stdout{}
|
||||
}
|
||||
|
||||
//nolint:forbidigo
|
||||
func (s *stdout) Do(_, _, url, title, body string) error {
|
||||
fmt.Println(title)
|
||||
fmt.Println("")
|
||||
fmt.Println("URL:", url)
|
||||
fmt.Println("")
|
||||
fmt.Println(body)
|
||||
fmt.Println("==========")
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *stdout) Name() string {
|
||||
return "stdout"
|
||||
}
|
||||
Reference in New Issue
Block a user